Base64 File Encoder / Decoder

File input

no file selected

Drop a file here

or pick one below — it never leaves your browser

Result

no result

Encoded or decoded output will appear here.

No file processedBase64 · File → Base64

About this Base64 File Encoder / Decoder

Encode files to Base64 or restore files from Base64 data.

Encoding and decoding both run locally in your browser via the File and Blob APIs — files and Base64 text never leave your device or touch a server.

FAQ

What's a data URI, and when should I use one?

A data URI embeds the file's Base64 data directly in HTML/CSS (data:image/png;base64,...), avoiding a separate HTTP request. Best for small files like icons — large files bloat your HTML/CSS instead of caching separately.

Why is the Base64 output larger than my original file?

Base64 adds roughly 33% overhead — every 3 bytes of binary data become 4 characters of text.

Does this work with any file type, or just images?

Any file type — there's no restriction on what you select or drop. Images additionally get an inline preview before and after conversion; other file types just show the Base64 and data URI text.

What output formats are available?

Two: the raw Base64 string and a ready-to-use data URI, shown side by side after encoding so you can copy whichever you need.

Is my file uploaded to a server?

No — read and encoded locally in your browser; it never leaves your device.

Can I convert the Base64 back into a downloadable file?

Yes — switch to Base64 → File, paste the data, and decode it to get a download link plus an inline preview (image thumbnail or text) for the original file.

I don't know the file's type — can this tool figure it out?

Yes. If you paste raw Base64 with no MIME type set, the decoded bytes are checked against common file signatures (PNG, JPEG, ZIP, PDF, MP3, and more); if none match, a UTF-8 text check runs instead. A type found only by the text check is marked "guessed from content" since it's less certain than a signature match.

Related tools