Open tools · 0

About

Base64 to Image

Paste a Base64 string, or a whole data: URI from a stylesheet or an API response, and the picture inside is shown, named by what its first bytes say it is. Download it as decoded.png, decoded.jpg or whatever it turns out to be. The window opens on a 214-byte sample PNG, so paste yours over it.

What it does

  • PNG, JPEG, GIF, WebP, AVIF and Windows icons are drawn; HEIC and TIFF are named but not drawn, as browsers cannot show them.
  • A data:image/png;base64, prefix is read and set aside, and the note says which type it declared.
  • Line breaks and spaces in the paste are ignored, and the URL-safe alphabet and missing padding are read too.
  • A character that does not belong is placed by line and column, so a cut-off or damaged string is easy to find.
  • The file comes out byte for byte as it was encoded, metadata included.
  • A tiny picture, such as a 16-pixel icon, is shown enlarged with sharp pixels so it can be seen.

How to use it

  1. Paste the Base64 or the data: URI into the Base64 box.
  2. Check the picture, and the type and size named above it.
  3. Download it, or copy it back out as CSS or an <img> tag.

What it does not do

  • SVG drawn as a picture: an SVG is text, so its Base64 decodes to the XML and is shown as text.
  • A preview past 15 MB: a picture that large decodes and downloads, but is not drawn on the page.

Questions

Why is my Base64 not showing as an image?

Most often the string was cut short when it was copied: the end then shows as an error, or the bytes are not a picture the decoder knows. Copy it again, from the first character after the comma to the last.

Where do I find the Base64 of an image?

In a page’s source or a stylesheet after data:image/png;base64, in an API response that carries a picture as a string, or in the raw source of an email. Paste it with or without the data: part.

Is the picture uploaded anywhere?

No. It is decoded and drawn by your browser, and the download is made from the same bytes.

Everything here runs in your browser. Nothing you type, paste or open is uploaded, and there is no account and no queue. How that works.

Often used with

More in Converters

  • Unit Converter: Convert length, weight, temperature, volume, area, speed, data size and nine more quantities, both ways, with the formula.
  • CSV Viewer & Editor: Open a CSV, Excel or JSON file as a table, tidy it (spaces, duplicates, garbled letters, dates and numbers) and save it as CSV, .xlsx or JSON.
  • JSON, YAML, XML & TOML: Convert between JSON, YAML, XML and TOML, keeping comments, key order and numbers exactly as written, and told what each format cannot carry.

All toolsAbout utilbrewPrivacy