Base64 File Encoder / Decoder

Encode any file to a Base64 string, or decode a Base64 string back to a downloadable file.

All processing happens in your browser. No data is sent to any server.

Frequently Asked Questions

What types of files can I encode?
Any file type is accepted. The tool reads the raw bytes of the file and encodes them as a Base64 string, regardless of whether the file is an image, PDF, archive, or text document.
What can I do with the Base64 output?
Base64-encoded files can be embedded directly in HTML (as data URIs), JSON payloads, or CSS. They are also used in email attachments, API requests, and configuration files that do not support binary data.
How does the decode tab work?
Paste a valid Base64 string into the input, enter a filename (including the extension), and click Download File. The tool decodes the string back to binary data in your browser and triggers a file download.
Why is the Base64 output larger than the original file?
Base64 encoding expands binary data by approximately 33%, because every 3 bytes of binary data become 4 printable ASCII characters. This overhead is the cost of representing binary data as plain text.

Related Tools