About the Base64 to Image tool
Paste a Base64 string — with or without the data: prefix — and get back a downloadable PNG. Perfect for debugging APIs, emails, and embedded assets.
Decoding happens entirely in your browser using the built-in canvas API. The Base64 string you paste is never uploaded, which matters because encoded images routinely come from private API responses, email payloads and internal systems.
How to use it
- Paste your Base64 string into the box.
- The preview appears immediately if the data is valid.
- Download the decoded file as PNG or JPG.
What a data URI actually contains
A full data URI looks like data:image/png;base64,iVBORw0KGgo…. The prefix declares the MIME type; everything after the comma is the encoded payload.
This tool accepts either form — the complete data URI or the raw Base64 string on its own. If the prefix is missing, the format is detected from the file signature in the decoded bytes.
A worked example
Base64 encodes three bytes into four ASCII characters, so an encoded image is always about 33% larger than the original binary file.
A 150 KB PNG becomes roughly a 200 KB string. That overhead is why inlining images as data URIs is sensible for small icons and a poor idea for photographs — it inflates the HTML and prevents the browser caching the image separately.
Common mistakes
- Leaving line breaks or stray whitespace in a string copied out of JSON or an email header. Strip them first.
- Pasting a string that was URL-encoded, where + has become %2B. Decode the URL escaping first.
- Expecting a truncated string to work. Base64 length is always a multiple of four, padded with = signs.
Questions people ask
Why does my string fail to decode?
Usually truncation, stray whitespace, or URL-encoding. Check that the length is a multiple of four and that the trailing = padding is intact.
Which formats are supported?
Anything the browser can render — PNG, JPG, GIF, WebP and SVG among them.
Is there a size limit?
Only your device's memory. Since nothing is uploaded, there is no server-side cap, though very large strings will be slow to paste.