Skip to content

Base64 to Image

Paste Base64 text or a data URI, see the picture, and save it as a real file. The type is found from the data itself, and nothing leaves your device.

Spaces and line breaks are ignored, and the “data:…” start is optional. The picture type is found from the data itself.

How to turn Base64 into an image

  1. Copy the Base64 text, or the whole data URI, and paste it in the box above.
  2. Press “Preview image” and check that it is the picture you expect.
  3. Press the download button. The file name ends with the right type, for example .png or .jpg.

Where Base64 pictures come from

To go the other way, use Image to Base64. If the result is a PNG you need as a JPG, try PNG to JPG.

Frequently asked questions

How do I convert Base64 to an image?

Paste the text in the box and press "Preview image". The picture appears, with its type, size in bytes and size in pixels, and a button to download it as a file.

Do I have to keep the "data:image/png;base64," start?

No. Both work: the full data URI and the bare Base64 text. Spaces, line breaks and the URL-safe form (with - and _ instead of + and /) are understood too.

How is the picture type chosen?

From the first bytes of the decoded data (PNG, JPG, GIF, WebP, BMP, ICO or SVG), not from what the start of the text claims. So the downloaded file always gets the right extension.

Is it safe to open an SVG from Base64?

Yes. An SVG is shown only as a picture. It is never put into this page as code, so a script inside it cannot run.

Why does it say the data is not a picture?

The text may be cut short, may be a different kind of file (a PDF or a document), or may not be Base64 at all. Copy the whole text again, without quotes around it.

Is my data uploaded?

No. The text is decoded in your browser, on your device. Nothing is sent to a server.