Base64 File Encoder/Decoder

Convert any file to Base64, or decode Base64 back into a file.

About this tool

Converts any file (not just images) to a Base64 text string, or decodes a Base64 string back into a downloadable file — useful for embedding a small file in code/config, or pulling one back out.

Everything runs locally in your browser — nothing is uploaded anywhere.

Frequently asked questions

Is there a file size limit?
No hard limit is enforced, but Base64 encoding inflates size by about 33%, and very large files can be slow to encode/display as text in a browser — this works best for smaller files (documents, small assets), not huge videos or archives.
What's the "data: URL prefix" option for?
A data URL (like data:application/pdf;base64,...) is directly usable as an href/src in HTML/CSS, while a raw Base64 string is just the encoded bytes with no format info — turn this on if you need the former.
How does decoding know what type of file to create?
It doesn't guess — you provide the filename (and its extension) yourself, and the file is saved exactly as you name it.