Base64 File Encoder - MacigHub

Encode any file (image, PDF, binary) to Base64 string or decode Base64 data back to a downloadable file.

Popular tools: Base64 · JSON Diff · UUID · QR Code · Regex · Password

About this tool

What does this tool do?

It converts any file — an image, PDF, font or other binary — into a Base64 text string, and converts Base64 text back into a downloadable file. This is how binary data travels through text-only channels such as JSON APIs, HTML data URIs, or CSS embeds.

How to use it

  • Drop a file into the tool or paste a Base64 string to decode.
  • Copy the output string for use in code, or download the decoded result as a file.
  • For plain text instead of files, use the lighter text variant.

Examples

  • A small logo PNG becomes a data:image/png;base64,… URI you can inline in HTML.
  • A PDF encoded to Base64 can be embedded in a JSON API request body.
  • Decoding shows the original filename suggestion and byte size before you download.

Important limitations

  • Base64 inflates size by about 33% — a 3 MB file becomes roughly 4 MB of text.
  • Very large files can strain browser memory; prefer direct file transfer for hundreds of megabytes.
  • Base64 is not encryption: anyone with the string can recover the file.

Privacy

Files are read and converted locally with the FileReader API. Nothing is uploaded to any server at any point.

Frequently asked questions

Can I encode any file type?

Yes — the tool treats input as raw bytes, so images, PDFs, fonts, archives and executables all work.

Why is the output so long?

Base64 represents every 3 bytes as 4 characters, hence the ~33% overhead plus line structure.

Text or file variant — which one?

Short strings: the text converter. Anything from disk or binary: this file converter.

Related tools

Base64 text converter · Hash generator · URL encoder