Open Toolkit

Convert Base64 to an image

Base64 text or a data URI back to an image file.

Free, no sign-up, no credit card. Your files stay on your device.

How to convert Base64 to an image

  1. Paste the Base64 text or the whole data URI into the box.
  2. Select "Decode image" to see the picture.
  3. Download it, with the right file type picked from its contents.

What to know

What you get back

The download is exactly the file that was encoded, byte for byte. Nothing is redrawn, so the quality is the original's, and any details stored inside, such as the camera or the place a photo was taken, are still there. The file is named image, with the extension that matches its contents.

Formats it recognises

  • JPG, PNG, WebP, GIF, BMP, AVIF, ICO, and SVG, which every current browser previews.
  • HEIC, TIFF, and JPEG XL are recognised and download with the right extension. Outside Safari the preview may stay blank, because the browser can't show them.
  • Fonts, PDFs, and other files that aren't pictures are refused, with a message saying so.

What it cleans up for you

Spaces and line breaks are removed, quotes around the text are dropped, and a missing = at the end is added back. The URL-safe letters - and _ are read as + and /. You can paste a whole line from a stylesheet, starting with url(.

If something goes wrong

It says the text isn't Base64

Something other than Base64 is mixed in, such as a closing tag or a semicolon after the text, or the copy stopped partway. Copy only the part between the quotes, and check you have the end.

The picture decodes but won't open on my computer

It may be a WebP, AVIF, or HEIC file that older apps don't open. Convert it to a format that opens everywhere. Use WebP to PNG.

Questions

What can I paste?

Plain Base64, URL-safe Base64, or a whole data URI such as data:image/png;base64,iVBOR…, with or without line breaks. A CSS url(…) around it works too.

Is my text uploaded?

No. Your files are processed on your device. We never upload them. The text you paste is decoded on your device too.

How does it know the file type?

From the decoded bytes, not the label in the data URI, which is sometimes wrong. A PNG labelled as JPEG still downloads as a .png.

Is it safe to decode an SVG?

The preview shows SVGs as a picture, which never runs scripts inside them. The downloaded file is exactly what was encoded, so open it in an image app rather than a browser tab if you don't trust where it came from.

Why does it say the text isn't a picture?

The Base64 may encode another kind of file, such as a font or a PDF, or it may be cut short. Copying from a long line sometimes misses the end; copy it again.

Something not working? Report a problem