curly{bits}

curlybits / Base64 / Base64 to Image

Base64 to Image Converter

Paste a Base64 string, with or without the data:image/…;base64, prefix, to see the image straight away. The image type is detected automatically, and you can download it as a file.

Input
Output

How to use the Base64 to Image Converter

  1. Paste the Base64 code or data URI into the left box.
  2. The image appears on the right, with its type and size.
  3. Click Download file to save it.
  4. To go the other way, use Image to Base64.

Where Base64 images come from

Images are often stored as Base64 text inside JSON API responses, databases, HTML emails and CSS files. A data URI looks like this:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB…

The part after the comma is the image's bytes written as text. This tool turns that text back into a real file.

No prefix? No problem

If you paste just the Base64 characters, the image type is detected from the file's first bytes (its "magic number"): PNG starts with iVBOR, JPEG with /9j/, GIF with R0lG and WebP with UklG.

Frequently asked questions

Is the image uploaded?

No. It's decoded in your browser.

Why doesn't my image show?

The text may be cut off, or it may not be an image. Check the status line: it says what kind of data was found.

Can it decode SVG?

Yes. Base64 SVG with the data:image/svg+xml;base64, prefix is shown and can be downloaded.

Updated