Image tool
Base64 to Image
Base64 to image decoder: paste Base64, a data URL, or HTML, CSS or JSON containing one to preview and download PNG, JPG, WebP, GIF, SVG and more. No upload.
Your file never leaves your device.
Runs locally in your browser
Your text is not uploaded.
Simple steps
How it works
- 01
Paste Base64, a data URL, or HTML, CSS or JSON containing one, or drop a .txt file.
- 02
Decode and preview the supported image.
- 03
Download the decoded image file.
What Base64 image data is
Base64 stores binary data, such as an image, as plain text made of 64 characters (A–Z, a–z, 0–9, + and /). Every 3 bytes become 4 characters, so the text is about a third larger than the file. It often appears as a data URL, such as data:image/png;base64,iVBORw0KGgo…, in HTML, CSS, emails and API responses.
The tool works out the file type from the decoded bytes, not from the label: PNG data starts with iVBOR, JPEG with /9j/, GIF with R0lG and PDF with JVBER. It also accepts URL-safe Base64 (- and _), missing = padding, and a data URL pasted inside an <img> tag, a CSS url() or JSON.
When decoding fails
The most common cause is text that was cut short. Logs, terminals and some editors cut long lines, and the image then ends too early; the tool tells you when an image looks truncated, so copy the full value again. Other causes are characters that do not belong to Base64, or data that is not an image or PDF, such as a font or a ZIP archive.
Safe preview and download
The preview shows the decoded file as an image, so an SVG cannot run any script it contains. Download the file with the matching extension, or copy the image to your clipboard as a PNG.
If you are deciding whether to embed images as Base64 yourself, keep it for small icons: large images embedded this way make pages heavier and cannot be cached by the browser separately.
Good to know
Frequently asked questions
Which input formats work?
PNG, JPG, GIF, WebP, AVIF, BMP, ICO and SVG images, and PDF documents, as raw Base64 or in a data URL. URL-safe Base64 and missing padding are fine.
Do I need the MIME type?
No. The file type is read from the decoded bytes themselves, so raw Base64 without a data: prefix works, and a wrong prefix does no harm.
Can I paste HTML, CSS or JSON?
Yes. Paste an <img> tag, a CSS url(...) or a JSON value with a data URL inside, and the Base64 is found automatically.
Can I copy the decoded image?
Yes. Copy image puts it on your clipboard as a PNG, ready to paste into a document or chat. PDFs can be downloaded.
Why does decoding fail?
The text may be truncated, contain invalid Base64 characters, or describe an unsupported image format.
Is my text sent anywhere?
No. Decoding and preview happen locally in the browser.
Can I download the decoded file?
Yes. Once a valid image is decoded, a download link appears with the matching file extension.