Base64 to Image
Paste a Base64 string or data URI and get the image back: previewed, identified and ready to download.
Decoding happens in your browser; nothing you paste is uploaded. Free, no sign-up, no watermark.
Line breaks, URL-safe characters (- and _), missing padding and CSS or HTML around a data URI are all fine.
Photos still called IMG_4821.jpg?
File Renamer AI names photos by what's in them, in bulk. 25 free renames.
How to use it
- Paste the Base64 text or data URI into the box. It decodes straight away when you paste into an empty box.
- Otherwise click Decode to image.
- Check the preview, type and dimensions, then download the image.
About this tool
Base64 images turn up in HTML source, CSS files, JSON API responses, email source and logs. This decoder accepts them however they arrive: with or without the data: prefix, wrapped over many lines, in the URL-safe alphabet with - and _, with missing = padding, or still surrounded by the CSS url() or HTML around it. URL-encoded SVG data URIs work too.
The file type is detected from the first bytes of the decoded data (the signatures of PNG, JPEG, GIF, WebP, BMP, AVIF, HEIC, TIFF, ICO and SVG), not from the label in the data URI, which is often wrong. If the label and the content disagree, you are told, and the download gets the correct extension. Data that is not an image can still be downloaded as raw bytes.
Good to know
- Decoding is byte-exact: downloading the result gives the original file.
- Up to about 60 MB of pasted text.
- TIFF and HEIC cannot be previewed in most browsers but can still be downloaded.
Other ways to do it
Mac (Terminal)
- Save the Base64 (without the data: prefix) to a file such as in.txt.
- Run: base64 -D -i in.txt -o image.png
Windows (Command Prompt)
- Save the Base64 (without the data: prefix) to in.txt.
- Run: certutil -decode in.txt image.png
Private by design: nothing is uploaded
The text you paste is decoded by your browser. Nothing is sent to a server, so it is safe for screenshots, scans and anything else hidden in a Base64 string.
Related tools
Frequently asked questions
How do I convert Base64 to an image?
Paste the string into the box. The image appears with its type, size and dimensions, and the Download button saves it with the right extension.
Do I need to remove the data:image/png;base64, prefix?
No. The decoder accepts the full data URI, the bare Base64, or the data URI still inside CSS or HTML.
Why does it say my Base64 is invalid?
The text contains characters that are not part of Base64, or it was cut off when copying (the length is wrong). Copy the whole string again, including the end, which often ends in one or two = signs.
How do I know what file type it is?
The tool reads the decoded bytes and recognises the format from its signature, so even a data URI labelled with the wrong type is identified correctly.