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
Paste a Base64 string above to preview the image
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
.svgWhen 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.
Paste the whole data URL, from data: to the last character, into the input box. The preview appears right away with the type, dimensions and decoded size, and you can save the file from there.
The most common causes are a truncated string, non-Base64 characters mixed into the middle of it, or data that simply isn't an image. URL-safe Base64 (with -/_) is converted automatically.
The tool sets no limit of its own; the constraint is your browser's available memory. Very large strings, in the tens of megabytes, can make the tab slow while it decodes.
No. All decoding happens locally using atob() and the native Blob/Image APIs. Nothing leaves your device, and once the page has loaded, decoding works without a connection.
A data URL embeds the entire file as inline text; a blob URL is a temporary in-memory reference instead. This tool turns your Base64 into a blob URL internally, so the preview and the download point to the decoded bytes instead of one very long string.
Paste the Base64 string or data URL, let the preview render, then click Download. The file is saved in its original format: PNG data becomes a .png, JPEG data a .jpg. With a data URL, the extension follows the type declared in the prefix; with raw Base64, the detected one. The tool doesn't convert between formats, so turning a PNG into a JPG needs a separate image converter.
References
Related Tools
- Image to Base64 Converter: Data URI, HTML & CSS Developer Drop a PNG, JPG, WebP, GIF or SVG up to 20 MB and copy raw Base64, a data URL, an <img> tag or a CSS url(). Runs in your browser, nothing uploaded.
- Base64 Decode Online — Free Base64 to Text Decoder Developer Free online Base64 decoder — decode Base64 strings back to plain text instantly in your browser. Validates input and shows decoded payload size.
- Base64 Encoder: Encode Text, PDF & Files Online Developer Encode UTF-8 text or any file (PDF, DOCX, XLSX, ZIP up to 50 MB) to Base64 or Base64URL. Runs in your browser, nothing is uploaded. Free, no sign-up.
- HTML Entity Decoder: Unescape HTML to Plain Text Developer Paste text with <, &, " or ' and get plain text back. Decodes every HTML5 named entity plus decimal and hex references, in your browser.
- URL Decoder: Turn %20, %2F & %C3%A9 Back Into Text Developer Paste a percent-encoded URL or query string and read it as plain text: %20 becomes a space, %C3%A9 becomes é, and + in a query becomes a space.