Skip to content
cliplimeClipLime

Convert Base64 to an image

Paste Base64 or a data URI, see the picture and save it.

Your text and files stay in your browser

You can paste a whole img tag or CSS url() too. The file type is detected from the bytes.

0 characters, 0 lines

At a glance

What it does
Decodes a Base64 string or data URI into an image you can see and download.
Accepts
Bare Base64, a full data URI, or an img tag or CSS url() that contains one.
Finds the type
Reads the format from the bytes (PNG, JPEG, GIF, WebP, BMP, ICO, AVIF, SVG, TIFF, HEIC), so a wrong prefix does not matter.
Preview
Shows the picture on a checkerboard so transparency is visible, with its pixel size and file size.
Download
Saves the image with the right extension for what it really is.
Privacy
Decoded in your browser. Nothing is uploaded.

How to do it

  1. 1

    Paste the Base64

    Paste the string or the whole data URI. Line breaks and a missing padding are fine.

  2. 2

    Look at the preview

    The image appears with its detected type and size. If it is not an image, you are told what it is instead.

  3. 3

    Download it

    Press Download to save the picture as a real file with the right extension.

Where Base64 images come from

  • APIs and databases that return pictures as a Base64 string inside JSON.
  • HTML and CSS that inline small images as data: URIs.
  • Email source, where attachments are stored as Base64 between boundary lines.
  • Canvas and screenshots, since canvas.toDataURL() returns a Base64 data URI.

When the type in the data URI is wrong

A data URI says what it contains, for example data:image/png;base64,. That label is only a claim, and it is sometimes wrong, especially in hand-written or generated data. This tool ignores the label and checks the actual bytes: PNG files start with a fixed 8 byte signature, JPEG with FF D8 FF, GIF with GIF89a or GIF87a, and so on.

If the label and the bytes disagree, the page tells you, and the download uses the extension that matches the bytes.

If the picture does not appear

  • The string was cut off. A truncated image often fails to load, or shows only the top part. Make sure you copied all of it.
  • There are backslashes. Base64 copied from a JSON string may have \/ instead of /. Remove the backslashes.
  • It is not an image. The Base64 may be a PDF or a ZIP. The page names the type and points you to the Base64 decoder to save it.
  • Your browser cannot draw the format. HEIC, for example, only opens in a few browsers. You can still download the file and open it in an app that supports it.

Questions people ask

How do I turn a Base64 string into an image file?

Paste the string, check the preview and press Download. You do not need to add or remove a data:image/...;base64, prefix, because both forms are understood.

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

No. Paste the Base64 with or without the prefix. If a prefix is there, it is read and then checked against the real bytes.

Why does the file extension differ from the one in my data URI?

The tool trusts the bytes over the label. If a data URI says PNG but the bytes are JPEG, the image is saved as .jpg so that other programs open it correctly.

Can it decode an SVG image?

Yes, both Base64 SVG and the percent-encoded data:image/svg+xml, form. SVG is shown as a picture only, so any script it contains does not run.

Is my image data uploaded?

No. The string is decoded and shown in your browser, and nothing is sent to a server.