Base64 to File
Decode any Base64 string or Data URL back to its original file. Auto-detects MIME type, supports inline image preview, and downloads the result—all processed locally in your browser.
Base64 to File
Paste a Base64 string, choose a format, and download the decoded file.
Decoded locally in your browser — files are not uploaded
How to Decode Base64 to a File
Paste the Base64 string
Paste a raw Base64 string or a full Data URL (data:image/png;base64,...). Whitespace and line breaks are stripped automatically.
Set MIME type and filename
If you paste a Data URL, the MIME type is detected automatically. Otherwise, select the correct type from the dropdown.
Convert and download
Click Convert & Download. Images are previewed inline; PDFs and binary files download directly to your device.
Base64 to File Examples
This tool accepts the following common input formats — paste and go.
data:image/png;base64,iVBORw0KGgoAAAANSUhEUg
AAAEAAAABACAYAAACqaXHeAAAACXBI...iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHe
AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFEklEQVR4...{
"filename": "logo.png",
"mime": "image/png",
"encoding": "base64",
"data": "iVBORw0KGgoAAAANSUhEUg..."
}iVBORw0KGgoAAAANSUhEUgAAAEAAAABACYAACq-XHe
AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFEklEQVR4...When Do You Need to Decode Base64 to a File?
Here are common scenarios where reversing Base64 encoding is useful.
Recover embedded assets
Extract images, fonts, or files from HTML, CSS, or JSON where they were embedded as Data URLs.
Debug API responses
When an API returns a Base64-encoded file, decode it immediately to verify the content is correct.
Extract email attachments
MIME email attachments are Base64-encoded. Paste the encoded block to recover the original attachment.
Validate round-trip encoding
Encode a file to Base64, then decode it back and confirm the output matches the original.
Frequently Asked Questions
What is the difference between raw Base64 and a Data URL?
A Data URL includes the MIME type header: data:image/png;base64, followed by the Base64 string. Raw Base64 is just the encoded string with no prefix. This tool accepts both—the MIME type is extracted automatically from the Data URL header.
Does the tool strip the data:...;base64, prefix automatically?
Yes. If your input starts with data:<mime>;base64,, the tool detects and strips the prefix before decoding, and pre-selects the correct MIME type for you.
Which file types are supported?
Any file type that can be represented as Base64: images (PNG, JPEG, GIF, WebP, SVG), PDF, fonts (WOFF, WOFF2, TTF), text files, JSON, and generic binary files.
Why does my Base64 string fail to decode?
Common causes: the string is truncated, contains non-Base64 characters, or is missing padding (=). Try pasting the complete string. If it comes from a Data URL, make sure you paste everything after base64,.
Are my files uploaded to a server?
No. Decoding happens entirely in your browser and nothing is sent to any server.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _, making the string safe to use directly in URLs without percent-encoding. This tool handles both standard and URL-safe variants automatically.