Convert Base64 to an image

Paste Base64 or a data URI to see the picture, its type and size, then download it. Nothing is uploaded.

You find a long string that starts with data:image or iVBOR in a stylesheet, a JSON response, an email template or a database column, and you want to know what picture it holds. This page opens in the Base64 to image direction. Paste the text into the box and the picture appears under it, with its real type, its size in bytes and, for most formats, its width and height. The text can be a whole data URI, a piece of HTML or CSS that contains one, or bare Base64. The type is read from the first bytes of the decoded data, not from the prefix, so a string that claims to be a PNG but holds a JPEG is shown as a JPEG, and the page tells you about the mismatch. Valid Base64 that decodes to a PDF, a ZIP or other data is reported as that, not drawn as a broken picture. You can then download the image under a name like decoded-image.png. The page reads PNG, JPEG, GIF, WebP and SVG, up to 10 MB once decoded, and it does not upload anything.

How it works

  1. Add one image
  2. Press Convert to Base64
  3. Pick a snippet and copy it

Frequently asked questions

How do I turn a data URI back into a file?

Paste the whole data URI, starting with data:image, into the box. The picture appears under it. Press Download image to save it with the right extension for its real type, such as decoded-image.png.

My Base64 starts with iVBOR. Do I need the data: prefix?

No. iVBOR is how a PNG file starts once it is Base64 text, and JPEG files start with /9j/. Bare Base64 is accepted, with or without the final = signs, and so is the URL-safe version that uses - and _ instead of + and /.

Why does it say the data is not an image?

The text decoded fine, but its first bytes are not PNG, JPEG, GIF, WebP or SVG. The message names a PDF or ZIP when it can. A common cause is a copy that missed the start or the end of the string, or Base64 of a text field that is not a picture.

Can this page open a data URI that is not Base64?

No. A data URI such as data:image/svg+xml,%3Csvg... holds percent-encoded text instead of Base64. This page reads only data URIs with ;base64 before the comma, and it says so when it finds another kind.