Base64 to Image

Preview and download the image hidden in a Base64 string.

Preview

The decoded image appears here.

Base64 to Image Converter

Paste a Base64 string or a complete data URI and see the picture it contains right away. The decoder turns the text back into bytes, detects the real format from the file header, shows a preview on a checkerboard (so transparent areas are visible), and lets you save the result as a normal image file with the right extension.

How it works

  1. Paste the string into the left box, e.g. data:image/png;base64,iVBORw0KGgo... or just iVBORw0KGgo....
  2. The tool strips the optional prefix, ignores line breaks, and decodes the Base64 (standard or URL-safe alphabet).
  3. The first bytes are compared with known signatures: iVBOR means PNG, /9j/ means JPEG, R0lGOD means GIF, UklGR is a RIFF container such as WebP, and PHN2Zy is usually an SVG starting with <svg.
  4. Click Download to save the file. The name ends in .png, .jpg, .webp, and so on, based on the detected type.

Press Sample to load a small 32×32 PNG icon and see the preview, the detected MIME type, and the decoded size.

Typical use cases

  • Inspecting images embedded in HTML emails, CSS files, or SVG sprites.
  • Debugging API responses that return screenshots, signatures, QR codes, or thumbnails as Base64 fields in JSON.
  • Recovering a picture from a browser's local storage, a database column, or a log file.
  • Checking that a data URI generated by a build tool actually contains the image you expect.

Tips

If the decoded result is not an image, the tool still shows its type and lets you download the raw bytes. For text hidden in Base64, use Base64 Encode / Decode instead. To create a data URI from a picture, go the other way with Image to Base64 or the format-specific PNG to Base64 converter.

Frequently Asked Questions

No. You can paste a full data URI or only the raw Base64 string. The tool decodes the bytes and recognizes the image format from its magic bytes (for example 89 50 4E 47 for PNG or FF D8 FF for JPEG), so the prefix is optional.

The data URI prefix is only a label and it is sometimes wrong, e.g. a JPEG saved as data:image/png. The tool trusts the actual file signature and shows a warning chip with the declared type, so you can download the file with the correct extension.

Make sure the string is complete (truncated copies from logs are common), that it wasn't URL-encoded (%2B instead of +), and that it doesn't contain quotes or a trailing comma from JSON. Whitespace and line breaks are ignored, and URL-safe Base64 with - and _ is accepted.

No. Decoding, preview, and download all happen in your browser with a local Blob URL. Nothing is sent to FowTools or any other server.