Developer Tools

Convert Base64 to an Image

Base64 image strings turn up in API responses, database columns, HTML email source and configuration files. Decoding one is the fastest way to see what it actually contains.

Paste the string below to preview the image and download it as a real file.

How to use this tool

  1. 1Paste your Base64 string or complete data URI into the text box.
  2. 2The preview renders as soon as the string is valid.
  3. 3Check the detected format and dimensions.
  4. 4Download the decoded file.

With or without the prefix

A complete data URI starts with data:image/png;base64,. Many systems store only the payload after the comma. Both work here: when the prefix is missing the format is detected from the leading bytes of the decoded data.

Common decoding problems

Strings copied from JSON often contain escaped characters or embedded newlines. Strings copied from a terminal may be truncated. If the preview does not appear, check that the string ends cleanly, that padding characters are intact, and that nothing was wrapped mid-way through.

Format signatures

Decoded PNG data begins with the bytes 89 50 4E 47, JPEG with FF D8 FF, GIF with the ASCII text GIF8 and WebP with RIFF followed by WEBP. Those markers are how the format is identified when no MIME type is supplied.

Frequently Asked Questions

Why does nothing appear?

The string is probably incomplete or contains stray characters such as quotation marks, spaces or line breaks introduced when it was copied.

Which formats can be decoded?

Any format your browser can render, including PNG, JPEG, GIF, WebP and SVG.

Is the decoded file identical to the original?

Yes. Base64 encoding is lossless, so the decoded bytes match exactly.

Is my data sent to a server?

No. Decoding happens in your browser and the string is never transmitted.