How to use it
- Paste the Base64 string or data: URI into the input box, or select Try a Base64 image.
- Leave Encoding on Base64 and Direction on Decode (preselected here).
- Check the preview, the detected type and the pixel size.
- Select Download to save the image with the right extension.
Worked example
The sample data:image/png;base64,iVBORw0KGgo... (164 characters of Base64) decodes to a 123-byte PNG of 24 x 24 px, a small gift box, saved as image.png.
Formats and limits
| Input | Base64, data: URI |
|---|---|
| Output | PNG, JPEG, GIF, WebP, SVG |
| Engine | TextEncoder/TextDecoder with strict validation |
Limitations
- HEIC and TIFF images are detected and can be downloaded, but only Safari shows a preview.
- The size comes from the header for PNG, JPEG, GIF, WebP, BMP, ICO, AVIF and SVG with width and height or a viewBox; otherwise the size the browser drew is shown.
- For an ICO file with several sizes, the first one is reported.
Questions
Do I need the data:image/png;base64, prefix?
No. A bare Base64 string works, and so does a full data: URI, one wrapped in quotes or CSS url(), or Base64 split over several lines. URL-safe Base64 with - and _ is accepted too.
Why does it say the type differs from the data URI?
The type is checked from the first bytes of the file. When a data: URI says image/jpeg but the bytes are a PNG, the download is saved as .png, its real type.
Why do I get an error instead of an image?
The text is not valid Base64 (the error gives the position of the first bad character), it was cut off when copied, or it decodes to something other than an image, such as text or a PDF.
Is my data uploaded?
No. The Base64 is decoded in your browser and the preview is drawn from a local copy; nothing is uploaded.
Privacy
Runs on your device. Files and text are processed in this browser tab and are not uploaded.
This page opens the Encoding toolkit ready for this task. See the privacy policy for how toolsdocks handles data.