Base64 to File Converter
Decode Base64, a data URI or hex back into a downloadable file, with the type detected automatically.
This decodes Base64, Base64url, a data URI or hexadecimal back into the original file. The type is taken from the data URI header when present, and otherwise identified from the decoded bytes' magic number — so a PNG, PDF or ZIP is recognised even from a bare Base64 string with no filename.
Runs in your browser- Detects
- 24 file signatures including PNG, JPEG, PDF, ZIP, DOCX, XLSX, MP4, WOFF2 and SQLite
- Accepts
- Data URIs, raw Base64, Base64url and hexadecimal
- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
How does it know what kind of file this is?
Why does my Base64 fail to decode?
How to use the base64 to file converter
- 1Enter or paste your base64, data uri or hex.
- 2Choose the input is.
- 3Enter or paste your file name.
- 4Enter or paste your mime type override.
- 5Press Run, then download the result when it is ready.
Embed this tool
Put the working base64 to file converter on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
File to Base64 ConverterEncode any file — image, PDF, video, font, archive — as Base64, a data URI, hex or a byte array.PDF to Base64 ConverterEncode a PDF as a Base64 string or a data URI, ready to embed in code.Base64 to PDF ConverterDecode a Base64 string into a real, downloadable PDF file.Base64 Encoder & DecoderEncode and decode Base64 with automatic direction detection, plus file and data-URI support.Data URI GeneratorTurn text, SVG or CSS into a data: URI you can inline directly in HTML or stylesheets.Multi-Format EncoderEncode text into Base64, hex, binary, URL, HTML entities, ROT13 and more, all at once.
Last updated
More encoders & decoders