Base64 to Image
Paste a base64 string or data URI to preview and download the image.
Base64 Input
Frequently Asked Questions
What formats does this tool support?
It supports any base64-encoded image including PNG, JPEG, GIF, WebP, SVG, and BMP. You can paste a raw base64 string or a full data URI (data:image/png;base64,...).
Is my data sent to a server?
No. All decoding happens entirely in your browser. Your base64 string never leaves your device.
How do I get the base64 of an image?
Use our Image to Base64 tool, or in JavaScript use a FileReader with readAsDataURL(). CSS background images in data URIs also contain base64 strings.
Can I download the decoded image?
Yes. Click the Download button to save the image to your device in its original format (PNG, JPEG, etc.).
Base64 Image MIME Types
A complete Base64 image is called a data URI and includes a MIME type prefix that tells the browser how to interpret the bytes:
| Format | MIME type prefix |
|---|---|
| PNG | data:image/png;base64, |
| JPEG | data:image/jpeg;base64, |
| GIF | data:image/gif;base64, |
| WebP | data:image/webp;base64, |
| SVG | data:image/svg+xml;base64, |
| BMP | data:image/bmp;base64, |
| AVIF | data:image/avif;base64, |
If you have a raw Base64 string without a prefix, paste it as-is — this tool will auto-detect the image format from the leading bytes and construct the correct data URI.
Where You Encounter Base64 Images
- CSS stylesheets — inline background images in legacy or email stylesheets:
background: url(data:image/png;base64,...). - JSON / REST API responses — image upload confirmation, avatar, or thumbnail fields often return the image as a Base64 string.
- HTML email — embedded logos to avoid external image blocking by email clients.
- Browser DevTools — images requested with
fetch()and read viaFileReader.readAsDataURL()appear as data URIs. - OCR / AI vision APIs — services like OpenAI Vision accept images as Base64 in the JSON request body.