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· Your data stays in your browser.
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?
- Paste Base64 text or a data: URL into the input box.
- Optionally set a file name and MIME type; otherwise both are detected.
- Click "Decode to file" and check the detected type, size and warnings.
- 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:
data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==
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.
Related tools
Base64 Decoder
Paste a Base64 string and read the original text instantly, even when the padding is missing.
Encoding & Decoding
File to Base64 Converter
Drop a file and get its Base64 string or a data: URL you can paste into HTML, CSS, JSON or an API request.
File Tools
Base64 Encoder
Convert any text, including emoji and accented characters, into a Base64 string in one click.
Encoding & Decoding
File Inspector
Drop a file to see what it really is: detected type, size, checksums, header bytes and warnings when the extension lies.
File Tools
Hex Viewer
Drop a file to see its raw bytes in the familiar offset | hex | ASCII layout, plus its detected type and size.
File Tools
Hex to Text Converter
Paste hex bytes from a dump, a log or a source file and read the text they spell.
Encoding & Decoding