Base64 to Image
Paste base64 or a data URL and download an image.
This runs in your browser. Nothing is uploaded.
About Base64 to Image
Decodes a base64 string or data URL back into a viewable, downloadable image file, entirely in your browser.
Base64 image data turns up in API responses, configuration files, email source, database columns and browser developer tools. It is unreadable as text, and the usual way to check what it actually contains is to paste it into a website — which means handing that data to a stranger.
Paste it here instead. The string is decoded in the page, rendered as a preview so you can confirm it is what you expected, and saved as a real image file.
It accepts a full data URL with the data:image/png;base64, prefix, or the raw base64 payload on its own. If the string is truncated or corrupted, you will get an error rather than a broken file.
How to use Base64 to Image
- 1Paste your base64 string or data URL into the text box.
- 2Click Decode & download.
- 3Check the preview and save the image.
What it won't do
- Assumes PNG when the data URL prefix is absent.
- Extremely long strings can be slow to paste and render in the text box.
Common questions
Do I need to include the data:image prefix?
No. A full data URL works, and so does the bare base64 payload. When the prefix is missing the decoder assumes PNG, which is right the large majority of the time.
Why do I get an invalid base64 error?
Usually the string was truncated on copy, or line breaks and quotation marks came along with it from a JSON or XML file. Make sure you have the complete value and nothing but the value.
Is it safe to decode base64 from an untrusted source?
Decoding happens in your browser's image pipeline, the same one that renders every image on every site you visit, so the risk is no different from viewing a web page. The data is not sent anywhere.
Related tools
Why this one doesn't upload your file
There is no server to upload to. This page is a static file, and the work happens in your browser using the same graphics and WebAssembly code that renders every other site you visit. Your file is read from disk into memory, processed, and handed back as a download. Once the page has loaded you can disconnect from the network entirely and it keeps working. The longer explanation