Pasting decodes straight away. Several data URIs, or one Base64 string per line, decode as separate images.
Need the reverse? Convert an image to Base64.
How to use
Paste or open the Base64 data
Paste a raw Base64 string or a data URI into the box, and it decodes at once. You can also click Open .txt file, or Try sample for an example.
Check the image details
The image appears with its format, MIME type, dimensions and file size. A warning shows if the declared type does not match the actual bytes.
Download, convert or copy
Set a file name, then click Download to keep the original format, Save as PNG, JPG or WebP to convert, or Copy image. Several images come as a ZIP.
Why Base64 to Image Converter
- Accepts a data URI or raw Base64, even with quotes, line breaks or URL-safe characters.
- Detects the real format from the file bytes and uses the right extension.
- Decodes several images from one paste and saves them as a ZIP.
- Save the original, convert to PNG, JPG or WebP, or copy the image.
Base64 prefixes and the formats they indicate
Every file format starts with a few signature bytes, so each one has a recognisable Base64 prefix. You can often tell the type at a glance before decoding anything. The prefixes below apply to raw Base64 and to the part after the comma in a data URI. A string that starts with none of them may be a less common format, or data that has been encrypted or compressed.
| Base64 starts with | Decoded signature | Format |
|---|---|---|
| iVBORw0KGgo | \x89PNG | PNG |
| /9j/ | \xFF\xD8\xFF | JPEG |
| R0lGOD | GIF8 | GIF |
| UklGR | RIFF | WebP (a RIFF container) |
| PHN2Zy | <svg | SVG |
| PD94bWwg | <?xml | XML, often SVG |
| Qk | BM | BMP |
| AAABAA | 00 00 01 00 | ICO |
| JVBERi0 | %PDF- | PDF (not an image) |
| UEsDB | PK | ZIP, DOCX or XLSX (not an image) |
Troubleshooting a Base64 image that will not decode
When a string refuses to decode, the problem is almost always in how it was copied, not in the image itself. Work through these checks in order.
- Truncated data: the string was cut off by a log viewer, a database column limit or a copy that did not include everything. Copy it again from the source, or export it to a .txt file and open that here.
- Wrong content: the value is a URL, a file path or an ID, not Base64 data.
- Double encoding: the data was Base64 encoded twice. Decode it once as text, then paste the result here.
- Mixed strings: extra fields were pasted with the data. Several complete data URIs are split automatically, but other text in between can confuse detection.
- Not an image: the bytes are a PDF, ZIP or other file. The tool reports PDFs directly and warns when it cannot detect an image type.