Base64 to Image

Paste a Base64 string — with or without the data:image/…;base64, prefix — to preview the image, see its real format and size, and download it.

Base64 or data URI

The image preview appears here.

How the format is detected

The tool decodes the Base64 and reads the first bytes of the file (the “magic number”): 89 50 4E 47 is PNG, FF D8 FF is JPEG, GIF8 is GIF, RIFF…WEBP is WebP. That means it shows the true type even when the data URI prefix is missing or wrong.

Troubleshooting

  • “Invalid Base64 character” — the string was cut or contains extra characters such as quotes or \n from a JSON field. Remove them or unescape first.
  • Not a recognised image — the data is a different file type, such as a PDF. Use the Base64 decoder, which can download any file.

Questions

Do I need the data:image prefix?

No. Raw Base64 works; the format is detected from the bytes.

Is the image uploaded anywhere?

No. It is decoded and displayed locally.

Related tools