🧩 Base64 to Image
Paste a Base64 string or data: URL and get the image back — preview it and download it, all locally.
Paste a Base64 string or a full data:image/… URL to preview and download the original image. The format is auto-detected from the data. Everything is decoded locally in your browser — nothing is ever uploaded. 🔒
How the base64 to image works
Base64 encodes binary image bytes as text so they can be embedded in HTML, CSS, JSON or data: URLs. This tool reverses that: paste the Base64 (with or without the data:image/…;base64, prefix) and it detects the format from the decoded bytes, builds a data URL, previews the image, and lets you download the real file. It's the inverse of the image-to-Base64 tool.
If the string starts with data:image/png;base64, it already carries its format; a raw Base64 blob is sniffed from its first bytes (JPEG, PNG, GIF and WebP have distinct signatures). Whitespace and line breaks copied from source code are stripped automatically. Everything is decoded on your device, so a Base64 image pulled from private code or an API response never leaves the browser.
Frequently asked questions
How do I convert Base64 back to an image?
Paste the Base64 text or the full data: URL into the box — the tool decodes it, shows a preview, and gives you a Download button to save the real image file.
Do I need the data: URL prefix?
No. If you include data:image/…;base64, it's used directly; if you paste only the raw Base64, the tool detects the image type from the decoded bytes and builds the data URL for you.
Why does it say the Base64 is invalid?
The text isn't decodable image data — often a truncated copy, an extra character, or non-image content. Re-copy the whole string; the tool already strips stray whitespace and newlines.
What image formats are supported?
The common web formats — PNG, JPEG, GIF and WebP — are detected from their byte signatures. The download keeps the original format and extension.
Is anything uploaded?
No — decoding happens entirely in your browser, so a Base64 image from private source code or an API stays on your device.