Base64 to Image Online: Preview and Save PNG, JPG, GIF

Base64 to Image Online: Preview and Save PNG, JPG, GIF

Paste raw Base64 or a data:image URL to preview the image with its type, dimensions and size, then save the original file. No upload, runs in your browser.

Updated November 2026

Reviewed by Rafael Duarte

Base64 / Data URL Input
Accepts data:image/...;base64,... or raw Base64 0 chars

Paste a Base64 string above to preview the image

Process Time
—
Privacy
Local Only
Payload Size
0 KB

Instant Decoding

Renders images from Base64 strings instantly, directly in the browser.

Local Processing

Your data never leaves the browser — no uploads, no server.

Format Detection

Auto-detects JPEG, PNG, GIF, and WebP from Base64 magic bytes.

How to convert Base64 to image

No upload, everything runs locally

1. Paste the string

A full data URL (data:image/...;base64,) or raw Base64. With a data URL the tool uses the declared type; with raw Base64 it recognizes JPEG, PNG, GIF and WebP from the first bytes.

2. Preview the image

The image renders instantly, along with its dimensions, format, and decoded size.

3. Download it

Save the image in its original format (PNG, JPEG, WebP, GIF…) straight to your device — no conversion.

What this Base64 to image converter does

More than just rendering the picture

Detects common formats automatically

For raw Base64, reads the magic bytes to recognize JPEG, PNG, GIF and WebP. Other formats such as SVG, AVIF, BMP or ICO need the data:image/...;base64, prefix so the browser knows what it's getting.

Accepts raw Base64 or a full data URL

Strips the data: prefix, ignores spaces and real line breaks, and accepts URL-safe Base64 (- and _). If you copied the string from JSON with literal \n sequences, remove those first: they corrupt the data.

Shows the image metadata

Dimensions, MIME type, and decoded file size — all before you decide to download.

Runs 100% in the browser

Decodes and renders locally with atob() and the native Blob/Image APIs — nothing leaves your device.

Examples

Input
Result
data:image/png;base64,iVBORw0K...
PNG rendered — download button appears
/9j/4AAQSkZJRg...
JPEG detected from magic bytes — download button appears
R0lGODlhAQABAI...
GIF detected — download button appears
"avatar": "iVBORw0KGgo..."
Copy only the value inside the quotes, then paste: PNG detected
data:image/svg+xml;base64,PHN2Zy...
SVG rendered from the declared type, saved as .svg

When you'll reach for this tool

The most common scenarios among people who use this converter

Debug an API response

Avatars and thumbnails often come back as a Base64 string buried inside a JSON payload.

Validate a data URI in CSS

Confirm an inline icon or background actually decodes to the asset you expect before you commit it.

Recover an image from an export

Database dumps and XML/JSON exports sometimes store images as Base64 blobs.

Inspect an image inside an email

MIME emails embed logos and signature images as encoded parts.

Test an encoding pipeline

Verify that the output of an encode script or API decodes back to the correct picture.

Go the other direction

To encode an image file into Base64 instead, use Image to Base64.

Nothing renders? Start here

Truncated string

If only a fragment got copied, the image won't decode. Check that you captured the entire string — a valid payload's length is a multiple of 4.

URL-safe Base64 instead of standard

Strings pulled from a URL or token often use -/_ instead of +//. This tool maps them automatically, but many decoders (plain atob(), for one) fail — swap the characters back in your own code.

Not actually an image

The decoded bytes need to match an image format the browser recognizes. If the string holds text, JSON or another kind of file, use Base64 Decode instead.

Why decode Base64 to image here

All decoding and rendering happens locally with atob() and the native Blob and Image APIs. Your image never leaves your device, and once the page is open, decoding doesn't need a network connection.

You see the type, dimensions and decoded size before you save, and the download is the original file, byte for byte. Raw Base64 works for JPEG, PNG, GIF and WebP; for anything else, paste the full data URL.

Frequently asked questions

Yes, for JPEG, PNG, GIF and WebP. The tool reads the first bytes of the decoded data to recognize those four formats. Anything else (SVG, AVIF, BMP, ICO) is labeled as PNG without a prefix, so it may fail to render or save with the wrong extension. Paste the full data:image/...;base64, string for those.

References

Related Tools