Toolvore

Base64 to File

Decode Base64 to a file locally, inspect byte headers and verify the SHA-256 fingerprint.

This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.

Validate Base64, inspect a safe text hex preview and download the original bytes without rendering the decoded file.

How to use it

  1. 1Paste raw Base64 or a Base64 data URL, or load a Base64 text file.
  2. 2Choose a download filename and explicit whitespace/padding options.
  3. 3Decode and review its size, MIME claim, header hint and SHA-256.
  4. 4Download only if you trust the source; renaming does not convert the file format.

Example

Input
AP8QQUI=
Output
00 ff 10 41 42, 5 bytes

Binary bytes are preserved, not decoded as UTF-8 text.

What happens to your data

The input and decoded bytes are processed locally and not saved in browser storage. Decoded content is not rendered. Downloads and clipboard copies remain on your device; analytics excludes their contents.

Last updated October 2026

Recover a downloadable file from raw Base64 or a Base64 data URL while preserving the original byte sequence. Inspect the exact size, a short hex view, the claimed MIME type and a SHA-256 fingerprint before downloading. Files are never rendered as documents or executed inside the converter.

This is useful when an API gives you a Base64 attachment, a debugging log contains binary data, or you need to verify an encoded file round trip. Valid Base64 proves only that the encoding is structurally valid; it does not establish that a PDF, archive or executable is complete or safe.

How it works

Paste the value or load a UTF-8 Base64 text file, set a download name and select Decode file. The decoded size is limited to 10 MiB; the input permits the corresponding encoded length plus 4,096 characters for headers and whitespace. The header of a data URL is limited to 1,024 characters. Clear, editing the payload or changing a validation option removes the old result, including its download action.

Raw input can use standard or URL-safe Base64. Mixed alphabets, misplaced padding, invalid characters and nonzero unused pad bits are rejected. Omitted padding is accepted only when explicitly enabled. Ignore ASCII whitespace allows spaces, tabs, carriage returns and line feeds, not arbitrary Unicode whitespace. Data URLs must end their header with ;base64, use the standard alphabet and may contain simple unquoted media parameters such as charset=utf-8. Percent-encoded non-Base64 data URLs, quoted parameters and HTML snippets are not accepted.

Empty input is normally an error. To intentionally create a zero-byte file, select Create an empty file and leave the payload empty. If that option is checked while bytes are present, decoding stops instead of discarding them.

The first 64 decoded bytes are shown in hexadecimal. A recognized header gives a format hint, not a full parser validation. A declared MIME type is untrusted metadata and is reported separately; a mismatch with a recognized header is flagged. The filename is your choice. Control characters, direction-changing characters, path separators and reserved filename characters are replaced; hidden leading dots, trailing dots and reserved Windows device names are handled. Long names are capped at 120 characters. Renaming .bin to .pdf does not turn arbitrary bytes into a PDF.

Downloads use application/octet-stream and an explicit download action. No PDF viewer, iframe, image renderer or script execution is used. Your operating system can still open the file after download, so only keep data you trust. SHA-256 can compare the recovered bytes with a known original; it is not malware detection or authentication. The tool does not upload content or store it in browser storage. Page assets and anonymous usage events may still use the network.

Worked example: restore a binary fixture exactly

Input
AP8QQUI=
Result
00 ff 10 41 42 — five-bytes.bin, 5 bytes

Zero and non-text bytes are preserved. The hex view is safe text, not an executed file preview.

Common use cases

  • Recovering a Base64 API attachment without text-encoding corruption
  • Comparing decoded byte fingerprints with an original file
  • Inspecting a binary fixture's first bytes without opening it
  • Downloading a known trusted file from a Base64 data URL

Frequently asked questions

Why does decoded.bin not open as a PDF?+

The original format is not reliably recoverable from raw Base64 alone. Set the name and extension only when you know the expected format. A header hint may help, but decoding does not repair or validate a full PDF.

Why reject an encoding another decoder accepts?+

This decoder requires the entire input to obey its selected alphabet and canonical pad-bit rules. Some lenient decoders ignore punctuation or malformed padding. Explicit options accept ASCII wrapping or omitted padding without silently repairing other corruption.

Can I paste data:application/pdf;base64,…?+

Yes. Base64 data URLs and simple unquoted MIME parameters are supported. The MIME is a claim, not verification. Plain data:text/plain,Hello is not a Base64 URL and is rejected.

Will this preview or run an unknown file?+

No. The only preview is a text hex dump. Download is a deliberate action using a generic binary MIME type; the tool does not open or embed decoded content. Your device can still run or open downloaded files later.

Is Base64 the same as encryption?+

No. Anyone can decode it without a secret key. Be careful with clipboard history, browser extensions and downloaded files even though this conversion runs locally.