Base64 to File Converter

Convert a file into a Base64 data URL, or decode a Base64 string back into a downloadable file.

Last updated: June 2026 | By Patchworkr Team

Choose a file to encode

Any file type works. The output is a Base64 data URL.

Selected file Base64 will appear here...

What does Base64 conversion do?

Base64 turns binary data into plain text so it can travel through systems that expect text. It is commonly used for inline images, email attachments, API payloads, and copying small files into code or JSON.

This tool supports both directions. You can encode any uploaded file into a Base64 data URL, or paste Base64 text to recover a downloadable file with the MIME type you choose.

How to use it

File to Base64

Upload a file, click Convert, and copy the generated Base64 data URL. Use this when you need inline assets or text-safe transport.

Base64 to File

Paste a raw Base64 string or a full data URL, choose a file name and MIME type, then download the reconstructed file.

Good fit

  • Useful for quick API testing when a service expects Base64 text instead of an uploaded file.
  • Handy for embedding small images or text files into HTML, Markdown, or JSON snippets.
  • Good for reconstructing a file from a Base64 payload you received from another tool or endpoint.

Notes

Base64 strings are larger than the original file, so they are not ideal for very large assets. If you are decoding data from outside this tool, make sure it is valid Base64 and pick the correct MIME type so the downloaded file opens correctly.

Tip: if your input starts with data:...;base64,, the tool will strip the prefix automatically.

Related Tools