Data URI to File
Decode a data: URI (Base64 or URL-encoded) back into a downloadable file with the right extension.
Paste or drop
Paste text below, or drop a file instead.
Choose an output
Decode a data: URI (Base64 or URL-encoded) back into a downloadable file with the right extension.
About Data URI to File
Paste a data: URI and this tool decodes it into the original file, choosing the file extension from the MIME type. Base64 and URL-encoded payloads both work, and images, PDFs, audio, video and text are previewed before you download.
When it helps
- Saving an image embedded in a web page, stylesheet or HTML email.
- Extracting a file from a data URI stored in JSON, a database field or a log.
- Checking what a data URI in someone else's code actually contains.
Tips
- You can paste the value with its surrounding quotes or wrapped in url(...) from CSS; those are stripped automatically.
- Line breaks inside the Base64 payload are ignored, and URL-safe Base64 with - and _ is accepted.
- If there is no MIME type, as in data:,Hello, the content is treated as text/plain, following the data URI specification.
- If you only have the Base64 part without the data: prefix, use Base64 Decode instead.
Good to know
Quick answers about data uri to file in your browser.
It says the data after the comma is Base64-encoded. Without it, the data is plain text with percent-encoding for special characters, which is common for SVG.
The MIME type in the URI was missing or not one the tool recognizes. Rename the file with the correct extension, or fix the MIME type in the URI and decode again.
Yes. There is no sign-up, no watermark and no limit on how many files you process.
No. Files are read and processed locally in your browser, so they never leave your device.
Related tools
Part of the Developer Utilities collection.