Turning Base64 back into a picture
This short guide explains what the base64 to image converter does, how to get the best result and when another tool is a better fit.
What Base64 image data is
Base64 is a way of writing binary data, such as an image, using only letters, numbers, plus and slash. It lets images travel inside text: in CSS files, HTML emails, JSON from APIs, databases and log files. The cost is size, since Base64 is about a third larger than the original file. Decoding turns that text back into the real image bytes.
PNG data always starts with iVBORw0KGgo, and JPG data with /9j/, which helps you recognise them.
Data URL or raw Base64
A data URL tells the browser what kind of image it is, for example data:image/webp;base64,UklGR… Raw Base64 is just the encoded part. The converter accepts both. When there is no prefix it assumes PNG, which works for PNG data; for other formats, add the matching prefix so the preview and download are correct.
Remove quotes, line breaks inside JSON strings or a trailing comma if decoding fails.
A worked example
A developer debugging an API sees a field called avatar containing a long string starting with /9j/. They paste it after typing data:image/jpeg;base64, in front, press Decode and see the user’s profile picture. They download it to check its size and confirm the API is returning the right image. A designer does the same with a logo copied from a CSS file.
Never paste sensitive images into online tools that upload data; this one runs locally.
Privacy and limits
Decoding happens entirely in your browser, so the data is never sent to a server. Very long strings, such as large photos, can take a moment to paste. If the preview doesn’t appear, the text is not a complete image: it may be cut off, contain extra characters or be a different file type.
Check that the string isn’t truncated, which often happens when copying from logs.
Going the other way
To encode text or files as Base64, use the Base64 Encoder Decoder. To change the downloaded image’s format, try the image converters linked below.
- Accepts data URLs and raw Base64
- No prefix means PNG
- Preview confirms valid image data
Further reading: The data URL scheme. It explains the format behind this base64 to image converter in more detail.
