Base64 to Image

Convert base64 strings into previewable images and download-ready files directly in your browser

Related Tags

base64
image
decoder

Base64 to Image

Base64 to Image Converter

Convert base64 strings or data URIs to images, preview the decoded result and download the file. Your image data stays in your browser.

Helpful Tips

  • You can paste raw base64 or a full data URI string.
  • Whitespace and line breaks are removed automatically.
  • All decoding happens locally in your browser.

Decoded Preview

Decoded image will appear here

Paste base64 data and click Decode Image to preview

Decode image data and inspect the result

Paste raw Base64 or a Base64-encoded image data URI, then click Decode Image. The tool decodes bytes, identifies common image formats, and asks the browser to load a preview. Successful results show MIME type, byte size, dimensions, and a normalized data URI that you can copy.

Raw Base64 versus a data URI

A data URI contains a media type and an encoded payload, for example:

data:image/png;base64,<base64 image bytes>

The angle-bracketed part is a placeholder, not a working image. Raw Base64 contains only the payload, without the data: prefix. MDN documents this data-URL syntax. For a working sample, use the tool's example button: it fills a complete 32×32 green SVG image, which you can decode and download as .svg.

How to use it

  1. Paste the image payload or a complete image data URI. Remove enclosing JSON quotes and JSON escape sequences first.
  2. Optionally enter a file name. The tool adds an extension based on the detected image type.
  3. Click Decode Image and inspect the preview and metadata.
  4. Download the original decoded image bytes or copy the normalized data URI. Decode again after changing input; editing alone does not refresh the result.

Whitespace and line breaks in the payload are removed. URL-safe - and _ are normalized, and omitted trailing Base64 padding is completed when possible. The tool does not automatically parse an entire JSON object to locate its image field.

Format recognition and downloading

The decoder recognizes PNG, JPEG, GIF, WebP, BMP, ICO, AVIF signatures and SVG text with a recognizable root. It uses the detected type rather than assuming that raw Base64 is PNG. A PNG declared as JPEG is identified and downloaded as PNG.

A recognized signature is not proof of a complete valid image. Preview success still depends on the browser being able to decode the full file. An unsupported codec or truncated content can fail after type detection. SVG payloads with unusual declarations may not match the recognizer; this is not a universal file-inspection tool.

Downloading does not resize, recompress, or strip metadata from the image. For animated formats, the downloaded original bytes are retained, while preview behavior depends on browser support. SVG downloads use .svg, JPEG uses .jpg, and other supported formats use their corresponding extensions.

Troubleshooting

  • Invalid Base64: check copied quotes, missing characters, illegal symbols, or a malformed data URI.
  • No supported image found: valid Base64 can encode plain text or any other data; it is not necessarily an image.
  • Type detected but preview fails: recopy the complete original payload and check browser format support.
  • The image looks different: decoding does not improve resolution or restore information lost before encoding.

Privacy and next steps

The tool processes input locally and does not upload the payload. Clearing releases the generated preview URL; it does not erase data already copied to the clipboard or saved as a file. Large encoded inputs can use substantial memory because encoded and decoded copies coexist.

For the reverse workflow, use image to Base64. Use the image compressor when you need a smaller raster file; inspect transparency and output format before replacing your original.