How to use the Base64 to Image tool
- Paste the Base64 text or data URL into the box, or choose a .txt file that contains it.
- Press Convert.
- Check the preview and the detected format and size.
- Download the image.
Paste a Base64 string or a full data:image URL, or choose a text file holding one, and see the picture it contains. The real format is read from the bytes themselves, and you can download the image exactly as it was encoded. Nothing leaves your browser.
Free · No sign-up · Files stay on your device
Nothing is uploaded - everything happens in your browser.
Base64 is a way of writing any file as plain letters, digits and a few symbols, so that it can travel inside text: a JSON response from an API, an HTML or CSS file, an email, a log line or a database field. Images are often stored this way, either as a bare string or as a data URL that starts with data:image/png;base64, followed by the encoded bytes.
Looking at that wall of characters tells you nothing. This tool decodes it, shows you the picture and gives you a normal image file to save.
Decoding Base64 gives back the original bytes exactly, and this tool saves those bytes as they are. The image is not redrawn or re-compressed, so the file you download is identical to the one that was encoded, with no loss of quality.
The format is read from the first bytes of the file, its signature, rather than trusted from the data URL label. PNG, JPG, GIF, WebP, BMP, ICO, TIFF, SVG, AVIF and HEIC are recognised. If the label says one thing and the bytes say another, for example a data URL marked image/png that actually holds a JPG, the file is saved with the correct extension and the page warns you about the mismatch. Some formats, such as TIFF and HEIC, may be saved correctly but not previewed, because most browsers cannot display them.
If the text is not valid Base64, or decodes to something that is not an image, such as a PDF, a ZIP or plain text, the page tells you instead of saving a broken file. Common causes are a string that was cut off when it was copied, extra characters such as quotation marks or a trailing comma from JSON, or text that is URL-encoded rather than Base64. Spaces and line breaks inside the string are ignored, so text wrapped across several lines is fine.
Developers meet them in API responses that return a picture inside JSON, in HTML and CSS files where small icons are embedded to save a request, in email source where attachments are encoded, and in logs where a screenshot or a captcha image has been written out as text. Testers use this tool to check that an endpoint really returns the image it should. Support staff use it to see what a customer pasted into a ticket. In every case the question is the same: what picture is hiding in this string, and can I have it as a file?
If you need to go the other way and turn an image into Base64, the image-to-Base64 tools on this site do that for JFIF, BMP and plain text files.
Decoding happens in this browser tab. The text you paste and the image it contains are never uploaded, which matters when the Base64 came from a private API response or an internal system.
No. Paste it with or without the prefix.
PNG, JPG, GIF, WebP, BMP, ICO, TIFF, SVG, AVIF and HEIC.
No. The decoded bytes are saved exactly as they were encoded.
The data URL label named one format but the bytes are another. The file is saved with the correct extension.
The string may be cut off, contain extra quotes, or hold another kind of file. Copy it again carefully.
No. It is decoded in your browser.
Your answer is stored in this browser only. It is not sent to us and no totals are counted.