Decoding a Base64 string back into an image
Paste a Base64-encoded image string - with or without the data:image/...;base64, prefix - and
this tool decodes it and displays the resulting image, with a download link. Everything happens locally in
your browser; the string you paste is never sent anywhere.
How this differs from this site's Image to Base64 tool
This tool performs the reverse operation of the Image to Base64 converter - that one takes a real image file and encodes it into a Base64 text string, while this one takes a Base64 text string and decodes it back into a viewable, downloadable image. Together they cover both directions of the same conversion.
Why the data: prefix matters for correct decoding
The data:image/png;base64, (or similar) prefix tells the browser what image format the
following data represents - without it, the browser has to guess, which is why this tool defaults to
assuming PNG when no prefix is present. If your actual image is a JPEG or another format, adding the correct
prefix yourself ensures it decodes and displays correctly.
Why this is commonly needed when working with APIs and databases
Many APIs, databases, and data-exchange formats embed images as Base64 text rather than binary files, since text-based formats like JSON can't natively carry binary data - being able to quickly decode a Base64 string pulled from an API response or database field, without writing a script, is a common practical need for anyone debugging or inspecting that kind of data.
Where Base64 image strings usually come from
Most Base64 image strings you will need to decode come from one of a few places: an API response that returns a picture inside a JSON field, a data URL copied out of a stylesheet or HTML source, an email template that embeds its logo inline, a canvas element exported by a script, or a database column that stores small images as text. Knowing the source also tells you what to expect - screenshots from a canvas are normally PNG, while photos from a camera upload are usually JPEG.
Cleaning the string before you paste it
A string copied out of source code or JSON often carries extra characters that are not part of the image data: surrounding quotation marks, escaped slashes written with a backslash, line breaks inserted by a text editor, or a trailing comma. Remove those first and paste only the characters between the quotes. Stray whitespace or a truncated copy are the two most common reasons a valid-looking string fails to display.
Troubleshooting a broken or blank result
If nothing appears, check three things in order. First, make sure the whole string was copied, since a Base64 image cut off partway through cannot be rebuilt. Second, check the format prefix - a JPEG decoded as PNG may fail to render, so add the correct data:image prefix for your file type. Third, confirm the string really is an image; Base64 is also used for PDFs, fonts and plain text, none of which will show up as a picture.