Skip to content
Convertto

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?

From the decoded bytes. Almost every binary format begins with a fixed signature — PNG starts with 89 50 4E 47, PDF with %PDF, ZIP with PK. The tool matches those, and refines ZIP further to spot DOCX, XLSX and EPUB by looking inside.

Why does my Base64 fail to decode?

Usually a truncated paste or wrapped text that included a prefix. Base64 must contain only A-Z, a-z, 0-9, plus and slash, with optional trailing equals padding — anything else means part of the string is missing or extra.

How to use the base64 to file converter

  1. 1Enter or paste your base64, data uri or hex.
  2. 2Choose the input is.
  3. 3Enter or paste your file name.
  4. 4Enter or paste your mime type override.
  5. 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

Last updated

More encoders & decoders