Base64 to File
Converter
Decode any Base64 string back to a downloadable file. Images, PDFs, audio, video, ZIP archives preview in-browser and save instantly. Zero uploads, 100% private.
File preview will appear here after decoding
From Base64 to File in Three Steps
No account, no server uploads. Paste, preview, and download in seconds.
Paste Base64 String
Copy your Base64 string and paste it in the input. The tool accepts raw Base64 or a full data:mime/type;base64,… data URI the format is auto-detected.
Select Type & Preview
Choose the MIME type and filename, or let it auto-detect from the data URI. Click "Decode & Preview" to see images inline, or get a file info card for other types.
Download or Copy
Save the file to your device with the correct extension, copy the data URI for use in code, or open the decoded file directly in a new browser tab.
Everything You Need to Recover Files
A complete Base64 file toolkit decode, preview, encode, and build data URIs all in one private tool.
Inline Image Preview
PNG, JPEG, GIF, WebP, SVG, and BMP images render directly in the tool so you can verify the file looks correct before saving it to disk.
20+ Supported Formats
Images, PDFs, text files, audio, video, ZIP archives, JSON, CSV, XML if it can be Base64-encoded, this tool can decode and download it.
Two-Way Conversion
Decode Base64 back to a file and encode any file to Base64. Drag-and-drop any file to generate its Base64 string or complete data URI instantly.
Data URI Auto-Detection
Paste a full data:…;base64,… URI and the MIME type, filename, and preview are all set automatically no manual configuration needed.
One-Click Download
Download the decoded file with the correct extension (e.g. .png, .pdf, .zip) with a single click no copy-paste into a hex editor required.
100% Private
All encoding and decoding runs locally in your browser via native Web APIs. Your files never leave your device safe for sensitive documents and proprietary assets.
File Type Reference
MIME types, extensions, and in-browser preview support for all supported file categories.
| Icon | MIME Type | Extension | Category | In-Browser Preview |
|---|---|---|---|---|
| 🖼️ | image/png | .png | Image | ✅ Inline render |
| 🖼️ | image/jpeg | .jpg / .jpeg | Image | ✅ Inline render |
| 🎞️ | image/gif | .gif | Image | ✅ Animated render |
| 🖼️ | image/webp | .webp | Image | ✅ Inline render |
| 🎨 | image/svg+xml | .svg | Image | ✅ Vector render |
| 📄 | application/pdf | Document | 📋 File info card | |
| 📝 | text/plain | .txt | Document | 📋 Text preview |
| 🌐 | text/html | .html | Document | 📋 File info card |
| 📊 | text/csv | .csv | Document | 📋 Text preview |
| 🔧 | application/json | .json | Document | 📋 Text preview |
| 🎵 | audio/mpeg | .mp3 | Audio | 🔊 Audio player |
| 🎵 | audio/wav | .wav | Audio | 🔊 Audio player |
| 🎬 | video/mp4 | .mp4 | Video | 🎬 Video player |
| 📦 | application/zip | .zip | Archive | 📋 File info card |
| 📦 | application/gzip | .gz | Archive | 📋 File info card |
| 💾 | application/octet-stream | any | Binary | 📋 File info card |
When You Need Base64 to File
Base64-encoded files appear in API responses, databases, and config files more often than you'd think.
API Response Inspection
Many REST APIs return generated files PDFs, reports, images as Base64 in JSON responses. Decode them instantly to verify the content without writing any code.
Email Attachment Recovery
MIME email attachments are Base64-encoded. Extract the encoded payload from a raw email source and decode it here to recover the original file.
Database Binary Storage
Applications that store files as Base64 in databases or NoSQL stores (MongoDB, Firestore) can have their content decoded and downloaded directly from this tool.
Embedded HTML Assets
Images and fonts embedded as Base64 data URIs in HTML or CSS can be extracted and saved as standalone files for reuse or optimisation.
Config & Secret Files
Service account JSON keys, TLS certificates, and SSH keys are often stored as Base64 in CI/CD environment variables. Decode and inspect them safely without a terminal.
IoT & Embedded Payloads
IoT platforms and messaging systems like MQTT frequently transmit binary sensor data or firmware as Base64. Decode payloads to inspect the underlying binary content.
How Base64 to File Decoding Works
Base64 encodes every 3 bytes of binary data as 4 printable ASCII characters making the output roughly 33% larger. To recover the original file, the decoder reverses this: every 4 Base64 characters map back to 3 bytes of binary data.
The resulting byte array is wrapped in a Blob with the correct MIME type, then converted to an object URL using URL.createObjectURL(). The browser uses this URL to trigger a file download with the proper extension no server required.
Data URIs combine the MIME type and Base64 payload in a single string (data:mime/type;base64,…). The tool auto-parses this prefix so you can paste a full data URI without manually stripping the header.
Frequently Asked Questions
Everything you need to know about converting Base64 back to files.
iVBORw0KGgo…. A data URI wraps that payload with a MIME type prefix: data:image/png;base64,iVBORw0KGgo…. Both formats are accepted by this tool. For data URIs the MIME type is auto-detected, so you don't need to select it manually.\" or \n) has been removed before pasting.atob(), Blob, URL.createObjectURL(), and FileReader. Nothing is transmitted. The tool works completely offline after the initial page load, making it safe to use with sensitive documents like certificates, keys, or confidential reports.FileReader.readAsDataURL(), in Python use base64.b64encode(), or in the terminal run base64 -i input.png.