Base64 to Image Converter

Decode a Base64 string into a picture. Paste it with or without the data URI prefix, check the preview and download the file. The decoding is done in your browser, so the data stays with you.

🔒 Runs in your browser. Your files and text are not uploaded.

How to use the Base64 to Image

  1. Paste the Base64 text or data URI into the box. The tool decodes it as soon as you paste, or when you press “Decode to image”.
  2. Check the preview, the detected type and the size in pixels.
  3. Press “Download image” to save the file with the right extension.
  4. No data at hand? Press “Load example” to see how it works.

What the decoder accepts

  • A full data URI such as data:image/png;base64,iVBORw0KGgo….
  • The bare Base64 string without a prefix.
  • Text wrapped in url(…) or quotes, copied from CSS or HTML.
  • Strings with line breaks or spaces, which are ignored.
  • The URL-safe variant that uses - and _ instead of + and /, and strings with missing padding (= characters).

The type of the image is detected from the first bytes of the decoded data, not from the label in the prefix, so a file mislabelled as PNG that is really a JPEG still downloads with the right extension.

If decoding fails

Message or symptomLikely causeWhat to try
“That is not valid Base64 text”The string was cut off, or it contains characters that are not part of Base64Copy it again in full; remove surrounding quotes or JSON escapes such as \n
“Not a recognised image”The data is valid Base64 but contains something else, such as a PDF or textCheck where the string came from
“Your browser could not display it”The image data is truncated or damagedCopy the complete string; very long strings may be cut by the program you copied from
Blank previewThe picture itself is transparent or one pixel in sizeDownload it and check in an editor

Where Base64 images come from

Base64 pictures show up in API responses (for example generated images, QR codes and signatures), in HTML emails and templates, in CSS files, in database exports and in the network tab of a browser’s developer tools. Developers often need to see what such a string contains, or to save it as a file for a bug report or a design review; this page does that without an account and without sending the data anywhere.

A note on safety

The picture is displayed in an image element, so even an SVG that contains scripts does not run them here. Still, only decode data that you trust, and do not paste secrets into any tool unless you know it works locally. This one does: you can load the page, switch off the connection and it keeps working. To go the other way and encode a file, use Image to Base64.

Frequently asked questions

How do I convert Base64 to an image?

Paste the Base64 text or data URI into the box. The picture appears below with a download button.

Do I need the “data:image/png;base64,” prefix?

No. The decoder works with or without it, and detects the real type from the data.

Which formats are supported?

JPEG, PNG, WebP, GIF, BMP and SVG, as long as your browser can display them.

Why do I get “not valid Base64”?

Usually because the string is incomplete or has extra characters. Copy it again in full, without surrounding quotes.

Is my Base64 data sent anywhere?

No. It is decoded in your browser and never leaves your device.