Base64 to File
Convert Base64 or Data URI strings back to downloadable files
Input (Base64 or Data URI)
Download
Paste a valid Base64 or Data URI string in the left editor to enable download.
Base64 to File Examples
Paste a Base64 string or Data URI to download the original file. Example input (a plain text file):
Data URI input
Click Sample above to load the example and try downloading it.
What Is Base64 to File?
This tool converts a Base64-encoded string or Data URI back into its original binary file, which you can then download. It accepts both raw Base64 strings and full Data URIs (e.g., data:application/pdf;base64,...). The MIME type is auto-detected from the Data URI prefix; for raw Base64, specify the MIME type manually in the field provided.
Base64 is defined by RFC 4648. The tool also accepts Base64url (using - and _) and handles missing = padding automatically. All processing runs in your browser—no data is sent to any server. To convert a file to Base64, use File to Base64.
How to Use This Tool
Paste Your Base64 or Data URI
Paste a Base64 string or a full Data URI into the left editor. Click Sample to see an example. The tool detects whether the input is a raw Base64 string or a Data URI automatically.
Set File Name and MIME Type
Enter the desired file name (including extension, e.g., document.pdf). If you pasted a Data URI, the MIME type is detected automatically. For raw Base64, enter the MIME type manually (e.g., image/png, application/pdf).
Download
Click Download File to save the decoded file to your device. The detected file size is shown before downloading. To encode a file to Base64, use File to Base64.
Supported Input Formats
This tool handles three input formats:
For Data URIs, the MIME type is read from the prefix and the file name field should include the appropriate extension. For raw Base64, manually enter the MIME type so the browser knows how to handle the downloaded file.
Frequently Asked Questions
Is my data private?
Yes. Decoding and file creation runs entirely in your browser. The file is never sent to any server. You can verify this by checking your browser's Network tab while using the tool.
What file types can I recover?
Any file type: images (PNG, JPG, SVG, WebP), documents (PDF, DOCX), audio (MP3, WAV), video (MP4), fonts (TTF, WOFF), archives (ZIP), and any other binary format. The key is specifying the correct MIME type and file extension so the browser downloads it correctly.
What should I enter for the MIME type?
Common MIME types: image/png, image/jpeg, application/pdf, audio/mpeg, video/mp4, text/plain, application/zip. If you have a Data URI, the MIME type is auto-detected. For raw Base64, enter the correct type for the file you want to recover.
Do I need to add = padding to my Base64 string?
No. The tool automatically calculates and adds any missing = padding. It also accepts Base64url format (with - and _ characters).
How do I convert a file to Base64?
Use the File to Base64 tool. Upload any file and get its Base64 or Data URI output. For image files specifically, use Image to Base64 which generates ready-to-use Data URIs.
Related Tools
For the Base64 specification, see RFC 4648. MDN's Data URIs guide covers the Data URI format. Blob API is used to construct the downloadable file.