Skip to content
Jellykit

File to Base64

Convert any file to Base64: images, PDFs, fonts or audio. Get raw Base64, a data URI, an HTML img tag, CSS url() or JSON. Copy or save it. Runs in your browser.

Runs in your browser. Nothing is uploaded.

About File to Base64

File to Base64 reads any file and encodes its bytes as Base64 text. Choose plain Base64, a complete data URI with the correct MIME type, a ready-made HTML img tag, a CSS background-image line, or a JSON object with the name, type and data.

Embedding a small icon, logo or font as a data URI saves an HTTP request, and Base64 is how binary files travel inside JSON APIs, emails and config files. Options let you wrap lines at 76 characters (the MIME standard) or switch to the URL-safe alphabet.

Base64 output is about 33% larger than the original file, so it suits small assets best. The stats line shows the exact size.

How to use File to Base64

  1. Open the tool above and add your file or text.
  2. Adjust the options to suit.
  3. Download or copy the result. Nothing is uploaded at any point.

Frequently asked questions

How do I turn Base64 back into a file?

Use Base64 to File: paste the text or data URI and download the decoded file.

Should I inline big images as Base64?

Usually not. Above a few kilobytes the 33% size increase and lost caching cost more than the saved request.

Is File to Base64 free and private?

Yes. File to Base64 is completely free, with no sign-up and no watermark. Your files are processed inside your browser and never uploaded to a server, so they stay on your device.

See all files tools →