About This Tool
Base64 encoding is essential when you need to embed binary files — like images, fonts, or PDFs — directly into HTML, CSS, JSON, or XML documents without managing separate file references. This tool lets you drag and drop any file from your computer and instantly produces the complete Base64-encoded string along with the properly formatted data URI ready to paste into an img src, a CSS background-image, or an API payload body.
Everything runs entirely in your browser using the built-in FileReader API, so your files are never uploaded to any server. The tool shows the original file name, MIME type, and size alongside the encoded output. A one-click copy button grabs the data URI without manual selection, and an inline image preview confirms the encoding looks correct before you use it elsewhere.
The reverse direction is equally useful: paste any Base64 string (with or without the data URI prefix) into the decode panel and click to download the reconstructed file. This is helpful for inspecting embedded assets in HTML emails, debugging API responses that return binary data as Base64, or extracting attachments from encoded payloads. All processing happens locally with zero external dependencies and no data ever leaves your machine.