Report

Help us improve this tool

Base64 to File

Decode Base64 strings or data URIs and download the binary file with MIME sniffing and a custom filename in your browser.

O M T

Decode Base64 or data URIs into downloadable files

API responses, email attachments, and inline data: URLs often ship binary payloads as Base64. This decoder accepts raw Base64 or a full data URI, detects the MIME type from the URI header or file magic bytes, and lets you save the bytes as a file, entirely in your browser.

When to use it

  • Recover a PNG, PDF, or ZIP embedded in a JSON field.
  • Turn a data:image/png;base64,… snippet into an image file.
  • Inspect decoded size and effective MIME before downloading.

For text-only payloads, try Base64 Decoder or Base64 to CSS.

Frequently Asked Questions

Does this support URL-safe Base64?

Yes. Hyphens and underscores are normalized to standard Base64 before decoding, and missing padding is added when possible.

How is the MIME type chosen?

If the input is a data URI, its declared type is used unless it is generic octet-stream. Otherwise common file signatures (PNG, JPEG, PDF, GIF, ZIP, GZIP) are sniffed from the first bytes.

Is my data uploaded?

No. Decoding uses the Web APIs atob and Blob locally; nothing is sent to a server.