Decode Base64 from JSON to an Image

Turn an encoded image from an API response or test fixture back into a file. Preview the decoded image before downloading.

Local processingOutput verificationNo sign-up
Base64 to Image illustration
Runs locally in your browser

JavaScript reads or writes the image bytes and Base64 text in your browser.

The tool loads its interface and processing files from the site. This workflow handles the contents you select or enter in the browser.

Decoded bytes
20 MiB

Limits are safeguards, not a guarantee every file below them will process. Complex files and device memory can require a smaller input.

Read the privacy policy

See how MAGODUCK tests tool outputs

1

Paste Base64 image data

Paste raw Base64 or a complete data:image/...;base64, URL.

Waiting for Base64 input.
HOW IT WORKS

How to use Base64 to Image

1. Paste text

Whitespace is tolerated; Data URL prefixes are parsed separately from raw Base64.

2. Decode bytes

Strict Base64 validation runs before a Blob is created.

3. Verify image

JPG, PNG, WebP, GIF and ICO signatures are detected from the decoded bytes.

TECHNICAL BEHAVIOR

What this tool actually does

Content wins over prefix

If a Data URL claims one image type but the bytes identify another, the tool uses the actual supported byte signature.

Raster images only

SVG/Base64 document markup is intentionally not rendered by this decoder; dedicated SVG tools apply stricter SVG checks.

Size guard

Decoded output is limited to 20 MB to avoid unbounded text-to-binary memory use.

FAQ

Base64 to Image FAQs

Can I paste a full Data URL?

Yes. The data:image/...;base64, prefix is accepted.

Why reject SVG here?

SVG is active XML-capable markup and is handled by the dedicated SVG rasterizers with specific safety checks.

Does decoding change the image?

No. Successful output is the exact decoded binary bytes.

Technical references checked October 2, 2026. A Data URL contains a media-type declaration and data payload; when Base64 is used the declaration precedes the encoded text.

MAGODUCK browser image tools

Focused tools with explicit format behavior and real output checks.

Use tool

Privacy

Selected data is processed in this browser workflow. This tool implements no image-processing upload endpoint.

Using this tool

Use files you own or may process. Keep originals and verify generated results before production use.

Image preview