Base64 to image
Text and files never leave this browserPaste a data URI or raw Base64 to preview the image and download it, or drop a picture to get a data URI you can paste into HTML or CSS. Standard and URL-safe Base64 are both accepted, including line wraps. The work runs in this tab, so nothing is uploaded. This page is for images; the Base64 encode and decode page stays text-only and was not changed.
How to use it
- Paste a data URI or raw Base64, drop a .txt file, or try the sample. To build a data URI, switch to Image to data URI and drop a picture.
- Check the preview, the detected format and the size. If the data URI's type does not match the bytes, the page says so.
- Download the original bytes, or save a PNG, JPG or WebP. In the other direction, copy the data URI or the raw Base64.
Details
- Input
- A data URI (data:image/…;base64, or a UTF-8 SVG URI) or raw standard or URL-safe Base64, with spaces and line breaks ignored
- Formats
- PNG, JPEG, GIF, WebP, BMP, ICO, SVG and AVIF are detected from the bytes, not only from the prefix
- Output
- Download the original file, or re-encode as PNG, JPG or WebP where the browser can draw the image. The other mode copies a data URI or raw Base64
- Limits
- Decoded images up to 8 MB; pasted text up to 12 MB
Questions
Are my files uploaded?
No. The page loads its code once, then reads and processes your files inside the browser tab. Nothing is sent to a server; you can confirm it in your browser's network panel while a file is processed.
How is this different from Base64 encode and decode?
That page encodes and decodes text (UTF-8), including a URL-safe variant. This page turns Base64 into a picture you can preview and download, or a picture into a data URI. The encode and decode page was not edited.
What can I paste?
A full data URI, or just the Base64 body. URL-safe alphabets (- and _ , with or without padding) and line wraps, which email often adds, are fine. A UTF-8 SVG data URI (without Base64) is accepted too.
The type in the data URI is wrong. What happens?
The preview and the default download follow the real bytes (for example a PNG labelled as JPEG). The page flags the mismatch so you can see it.
Can I turn an image into a data URI?
Yes. Choose Image to data URI, drop a PNG, JPG, GIF, WebP or SVG, and copy the data URI or the raw Base64. You can keep the original format or re-encode as PNG, JPEG or WebP first.
Is there an API?
Yes. The MCP server on this site has a base64_to_image tool that inspects a data URI or raw Base64 (format, size, dimensions) or wraps raw Base64 in a data URI. It does not accept or return image files.