Click or drag & drop a file here

Convert Files to Base64 (and Back) ๐Ÿ”„

Encode images, fonts, and binaries into Base64 strings or decode strings back into their original file formats instantly. Everything happens locally in your browserโ€”your data never leaves your machine.

๐Ÿ’ก Why use this tool?

Base64 encoding is essential for modern web development. Use this tool to:

  • Embed Assets: Turn icons and fonts into DataURIs to include them directly in CSS or HTML, reducing HTTP requests.
  • Data Transport: Move binary data through text-based systems like JSON payloads or legacy APIs.
  • Privacy-First Processing: Since no files are uploaded to a server, itโ€™s the most secure way to handle sensitive assets.

๐Ÿ“˜ How to use it

  • Convert a File to Base64: Drag and drop your file into the box. Toggle the DataURI prefix to get a string ready for <img> tags or CSS url() functions.
  • Decode Base64 to a File: Paste your string into the input. Weโ€™ll attempt to auto-detect the file type. If the string lacks a header, you can manually select the correct MIME type before downloading.
  • Smart Copying: Large Base64 strings can lag your clipboard. Use Copy All for production code or Copy Preview (first 1,000 characters) for quick debugging.

๐Ÿง FAQ

Is there a file size limit? The limit is defined by your browser's available memory. For the smoothest experience, we recommend keeping files under 5MB. Larger files may cause the browser tab to temporarily freeze.

What if my string is missing the prefix? No problem. Paste the "pure" Base64 string and manually assign a file extension (e.g., .png or .pdf) to ensure the file opens correctly after downloading.

๐Ÿ“š The Tech behind Base64

Base64 encoding uses a 64-character alphabet to represent binary data as text. While this increases the file size by roughly 33%, the trade-off is often worth it for the convenience of embedding assets directly into your code and streamlining your asset pipeline.