File to Base64

Encode any file to a Base64 string or data: URI, and decode Base64 back to a downloadable file — 100% in your browser, no upload.

Drop any file here or click to browse

🔒 Everything runs in your browser — your file is never uploaded, and it works offline.

Encode and decode any file

Drop any file — an image, PDF, font, zip, or WASM module — and get its Base64 string and a ready-to-paste data: URI, each with a one-click copy. Switch to Decode to paste a Base64 string or data URI and download it back as the original binary file. Everything runs locally in your browser, so even large or sensitive files are never uploaded.

Base64 and data URIs

Base64 turns raw bytes into plain ASCII so binary data can travel safely through text-only channels such as JSON payloads, environment variables, or a source file. A data URI wraps that Base64 with its MIME type (data:image/png;base64,…) so it embeds directly in HTML, CSS, or Markdown with no separate request.

Frequently asked questions

How is this different from the image-to-Base64 tool?

The image tool takes images only and shows you a preview of them. The Base64 encoder next door is built around text — it can open a file too, but a smaller one, and it hands back the raw Base64 without a data: URI. This is the one for files: any file up to 10 MB — fonts, PDFs, archives, executables — encoded byte for byte into both a Base64 string and a data: URI carrying the right MIME type, and decoded back into a file you can download.

Are my files uploaded to a server?

No. Encoding and decoding run entirely in your browser with the FileReader and Blob APIs, so your files never leave your device and the tool works offline.