Images & Design

Base64 to Image

Paste raw Base64 or a raster image data URL to recover an image file. The tool checks the encoding, inspects the file signature, and asks the browser to decode the image before offering a preview and download.

Free online tool

Loading tool…

Paste your encoded image

Standard Base64 with + / and required = padding. Whitespace and line breaks are accepted. Maximum decoded file: 5 MB; maximum decoded pixels: 24 megapixels. SVG, HTML, scripts, and non-image bytes are rejected.

Image preview

Your image preview appears here after validation.

The MIME type is checked against the file signature, then the browser must successfully decode the image.

Selected files are processed in your browser. This tool does not upload image bytes or fetch remote image URLs. Clear the tool to release its local image previews.

GET STARTED

How to use the Base64 to Image

  1. 01

    Paste a complete image data URL or raw Base64 with standard padding.

  2. 02

    Select Decode & preview to validate the string and image bytes.

  3. 03

    Review the detected format, dimensions, and decoded byte size.

  4. 04

    Download the image in its original raster format.

Examples

Restore an embedded PNG

Paste a string beginning with data:image/png;base64,. The data URL type must match the PNG signature in the decoded bytes.

Inspect raw Base64

Paste only the encoded characters when no data URL prefix is available. The tool infers PNG, JPEG, GIF, WebP, BMP, or AVIF from the file header and verifies browser decoding.

Validation happens in layers

The parser accepts standard Base64 characters, required padding, and whitespace. It rejects unsupported data URL types, checks the decoded byte limit, identifies a supported raster signature, and rejects a data URL whose declared type disagrees with those bytes.

A signature is only the first check

A few matching header bytes do not make a valid image. The browser must also decode the file successfully. Malformed, unsupported, or excessively large images produce an error instead of a download preview.

The download preserves the file

The tool creates a Blob from the decoded bytes; it does not draw and re-encode the image. Original metadata and animation bytes are preserved. The displayed preview still depends on browser support and available memory.

What to know

  • Decoded files are limited to 5 MB and 24 megapixels.
  • URL-safe Base64 using - and _ is not accepted; no remote URL loading.

Common questions

Can this decode SVG Base64?

No. SVG, HTML, and other non-raster payloads are rejected. The accepted file types are PNG, JPEG, GIF, WebP, BMP, and AVIF.

Can I paste line-wrapped Base64?

Yes. Whitespace is removed before validation. The remaining content must use the standard + / alphabet with required = padding.

Why is my data URL rejected?

Its MIME type may be unsupported, it may omit the base64 marker, its bytes may not match its declared image type, or it may exceed the limits.

Does decoding remove private metadata?

No. The download preserves original bytes, including any embedded location or camera metadata. Use a separate metadata tool before sharing sensitive files.

Sources & references