Convert
Decode Base64 back to an image
Paste a Base64 string or a whole data: URI and get the picture back, previewed and downloadable. The type is decided by the decoded bytes rather than by what the data URI claims to be - if a string says image/png over GIF bytes, this tells you rather than handing you a file that no viewer opens. Whitespace and line breaks in a pasted string are ignored, because Base64 copied out of a config file usually has them.
How to decode Base64 back to an image
- Paste the Base64 string, or the whole data: URI.
- Press Decode. The image appears if the bytes really are one.
- Download the file.
Supported formats
This tool accepts JPG, PNG, WebP, GIF, BMP and AVIF files. Everything is decoded by your own browser, so the formats available depend on what your browser can open - which for HEIC in particular varies between Safari and other browsers.
Frequently asked questions
It says my string is not an image. What went wrong?
The string decoded successfully but the resulting bytes do not begin like any image format - which usually means part of the string was lost on the way in. Base64 copied across a line-wrapping terminal or a chat client is the common culprit. Whitespace and newlines are fine and are stripped automatically; a missing chunk in the middle is not recoverable.
Why does it warn me about the declared type?
Because a data URI's media type is a claim, not a fact, and the two can disagree. A URI that says image/png over GIF bytes is a small but real way to get something rendered as a type it is not, so the tool sniffs the bytes, tells you what they actually are, and treats them as that. The declaration is shown so you can see the mismatch rather than having it silently corrected.
Can I paste a data URI with the data: prefix included?
Yes. Either form works - a bare Base64 string or a full data:image/png;base64,... URI. A data URI that is URL-encoded rather than Base64-encoded is refused with an explanation, because there is no Base64 in it to decode.
Is the decoded image sent anywhere?
No. The string you paste is decoded in this tab, the preview is a blob URL pointing at memory in your browser, and the download comes from that same buffer. A content security policy the browser enforces prevents this page from sending anything to another domain.
Related tools
- Image to Base64Turn an image into a Base64 string or a data: URI you can paste into HTML or CSS.
- Image Metadata ViewerInspect every metadata block in an image: EXIF, XMP, IPTC, colour profile and text records.
- Image CompressorCompress JPG, PNG and WebP images in your browser.
- Image ResizerResize images by width, height, percentage or exact dimensions in your browser.
Looking for something else? Browse all ImageUtility tools.