Base64 to Image
Decode a Base64 string or data URI to an image online: preview it, see its type, size and dimensions, and download it as PNG, JPEG, SVG, WebP or GIF.
Something not working, or missing a feature? Send feedback
About the Base64 to Image
The Base64 to Image decoder turns a Base64 string or data URI back into an image, so you can see what an API response, database field or inline CSS image actually contains. It detects the real file type from the decoded bytes, shows the size and dimensions, and lets you download the file.
Images are processed in your browser with its built-in codecs, so your photos and screenshots are never uploaded.
How to use the Base64 to Image
- Paste the Base64 text or the full data URI. Line breaks, missing padding and Base64URL are handled.
- Check the preview, the detected type, the file size and the pixel dimensions.
- Download the image with the right file extension.
Common mistakes
- Double encoding. If the decoded result is Base64 text again rather than an image, the data was encoded twice. Decode it once with the Base64 tool, then paste the result here.
- URL-escaped data. Base64 copied from a URL may contain %2B and %2F instead of + and /. URL-decode it first.
Works well with the Base64 to Image
- Image to Base64: encode an image the other way.
- URL Encode / Decode: remove URL escaping from Base64 copied out of a link.
- JSON Viewer: find the Base64 field inside a large JSON response.
Frequently asked questions
Why does it say the data is not an image?
The decoded bytes do not start with the signature of a supported format (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO or SVG). The text may be cut off, encoded twice, or contain a different kind of file such as a PDF.
The data URI says image/jpeg but the tool shows PNG. Which is right?
The tool trusts the file signature in the bytes over the declared type, so the image really is a PNG. Fix the declared type in your code so browsers and other tools are not misled.
Is it safe to preview an SVG from an unknown source?
Yes, here. The image is shown in an <img> element, where scripts inside an SVG never run. Opening the downloaded SVG directly in a browser tab is different, so be careful with files from untrusted sources.
Related tools
Image Compressor
Compress JPEG, PNG and WebP images online with a quality slider and optional resizing. See the size saved for each file. Images never leave your browser.
Image Resizer
Resize images online to exact pixels, a percentage or presets like 1200×630 for Open Graph. Crop to fill, pad or stretch, in batches, without uploading.
Image Cropper
Crop images online with a draggable box, fixed ratios like 1:1, 16:9 or 1200×630, or exact pixel values. Save as JPEG, PNG or WebP without uploading.
Image Converter
Convert images online between PNG, JPEG and WebP, and turn SVG into PNG, with quality and size options. Convert several files at once in your browser.
Image to Base64
Convert images to Base64 online: get a data URI, raw Base64, an <img> tag or CSS background for PNG, JPEG, SVG, WebP or GIF. Files stay in your browser.