What you can paste
Either form works:
- a full data URI, such as
data:image/jpeg;base64,/9j/4AAQSkZJRg…, copied from HTML, CSS or a browser’s developer tools; - the raw Base64 on its own, as returned by many APIs, databases and logs.
Line breaks and spaces are removed automatically, so text wrapped at 76 characters (common in email and PEM-style output) decodes fine. URL-safe Base64, which uses - and _ instead of + and /, is converted too, and missing = padding is added back.
Finding out what kind of image it is
When there is no data: prefix, the tool reads the first few bytes of the decoded data, which identify the format. PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG are recognised, and the download gets the matching extension. The format and pixel size appear under the preview.
When decoding fails
- “Invalid Base64 characters”: something other than Base64 got copied, often the surrounding quotes, a trailing comma or
\nescape sequences from JSON. Remove them and try again. - “Invalid Base64 length”: the string was cut short. Logs and database viewers often truncate long values, so fetch the full value.
- “Could not read image dimensions”: the text decodes, but it isn’t an image your browser can display. It may be a PDF, a ZIP, or an image format like HEIC or TIFF that browsers don’t show.
- “Data URI must use ;base64, encoding”: some SVG data URIs are URL-encoded text rather than Base64. Those can be pasted straight into a browser address bar instead.
Questions
Is the pasted data sent anywhere?
No. It is decoded in your browser. That matters when the string came from a production database or contains a user’s photo.
Can I convert the decoded image to another format?
Download it, then use the image converter. To go the other way, use image to Base64.