Skip to content

Base64 to File Converter

Paste Base64 or a data URL, click decode, and download the original image, PDF, archive or any other file.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is Base64 to File Converter?

APIs, e-mails and databases often hand you a file as a long Base64 string. This tool decodes it back to the exact original bytes and lets you save it as a file. It accepts plain Base64 (including URL-safe characters, line breaks and missing padding) and complete data: URLs such as data:image/png;base64,iVBORw0…

After decoding, the tool checks the first bytes against a table of file signatures to tell you what the data really is (PNG, JPEG, PDF, ZIP, DOCX…), picks a sensible default file name and extension, and shows the size and the first bytes. You can override the file name and MIME type. Decoded output is limited to 100 MB.

How does it work?

  1. Paste Base64 text or a data: URL into the input box.
  2. Optionally set a file name and MIME type; otherwise both are detected.
  3. Click "Decode to file" and check the detected type, size and warnings.
  4. Download the file. Nothing is uploaded and nothing is executed.

Common use cases

  • Saving an image or PDF returned as Base64 by a REST API or stored in a JSON field.
  • Recovering an attachment from a raw e-mail (MIME) part.
  • Turning a data: URL copied from browser dev tools back into an image file.
  • Checking what a mysterious Base64 blob in a config or log really contains.

Examples

Try this input in the tool above:

Input
data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==
Output
File name: file.txt
Size: 13 B (13 bytes)
Detected type: Plain text — text/plain
MIME: text/plain
First bytes (hex): 48 65 6C 6C 6F 2C 20 77 6F 72 6C 64 21

Privacy

Base64 to File Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

A Base64 string only preserves bytes, not the original file name, so the name is guessed from the detected type. Text that is not valid Base64 is rejected, and decoded files larger than 100 MB are refused. Do not run decoded files you do not trust.

Frequently asked questions

Which input formats are accepted?

Plain Base64 or Base64URL, with or without padding and with line breaks, or a full data: URL (base64 or percent-encoded).

How does it choose the file extension?

From the data itself: signatures such as PNG, JPEG, PDF, ZIP or GZIP map to their usual extension. If nothing matches, the file is saved as file.bin unless you give a name.

Why does it warn that the data is executable?

Decoded bytes starting like a Windows, Linux or macOS program are flagged because attackers sometimes hide programs in Base64. Never run a file whose source you do not trust.

More tools in File Tools →