Skip to content

Base64 to Image Converter

Convert Base64 to image: paste a Base64 string or data URI to preview and download the picture.

Base64 or data URI

Image preview

Type
PNG image
Size
196 bytes
Dimensions
—
Base64
264 characters
Decoded image preview

How to convert Base64 to an image

  1. Paste the Base64 string or the full data URI (data:image/png;base64,…) on the left.
  2. The image appears on the right with its type, file size and pixel dimensions.
  3. Press Download to save it — as .png, .jpg, .gif, .webp, .svg or .ico, whichever the data really is.

How the image type is detected

Every image format starts with a few fixed bytes, its “magic number”. The tool reads them instead of trusting the data: prefix, so a PNG labelled as JPEG still downloads as a .png and you are told about the mismatch. You can often recognise the type from the first Base64 characters yourself:

How common file types begin in Base64
FormatBase64 starts withSaved as
PNGiVBORw0KGgo.png
JPEG/9j/.jpg
GIFR0lGOD.gif
WebPUklGR.webp
SVGPHN2Zy or PD94bWw.svg
ICOAAABAA.ico
PDFJVBERi0.pdf

Where Base64 images come from

You'll find them in HTML and CSS as data URIs, in API responses and JSON payloads, in email source code and in exported design files. The tool accepts all of these forms:

Raw Base64, a data URI, or a CSS url()
iVBORw0KGgoAAAANSUhEUgAA…

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA…

"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ…"

SVG images are shown only through an <img> element, where browsers never run scripts, so previewing untrusted Base64 is safe.

Other Base64 tools

Need the opposite? The image to Base64 converter turns a file into Base64, a data URI and ready-to-paste CSS and HTML. For Base64 that contains text, use the Base64 decoder; to pick a color from the decoded picture, open it in the image color picker.

Frequently asked questions

Do I need the data:image/png;base64, prefix?
No. Paste either the raw Base64 or a complete data URI. The image type is detected from the data itself, so it works even when the prefix is missing or wrong.
Which image formats are supported?
PNG, JPG/JPEG, GIF, WebP, SVG and ICO are detected and previewed. PDFs are recognised too and can be downloaded. The download always gets the correct file extension.
How do I convert Base64 to a PNG or JPG file?
Paste the Base64, check the preview, then press Download. The file is saved in its original format — a Base64 PNG becomes a .png, a JPEG becomes a .jpg. The tool doesn’t re-encode the image, so there is no quality loss.
Is it safe to preview SVG from Base64?
Yes. SVG is shown only as an <img>, where browsers never run scripts or load external resources. Everything happens locally; nothing is uploaded.
Why does the preview stay empty?
Either the Base64 is invalid — the error message shows where — or the data isn’t one of the supported image formats. You can still download the decoded bytes and inspect them.