Convert Base64 to an image
Paste a data URL or a raw Base64 string, click Decode, and see the image with its real format and size, then download it with the right extension.
- Free, no sign-up
- No upload
- Full resolution kept
How it works
Three steps, under a minute
Paste a data URL or a raw Base64 string, click Decode, and see the image with its real format and size, then download it with the right extension. Decoding happens in your browser.
- 1
Add your files
Paste the Base64 text, with or without the data: prefix.
- 2
Process
Click Decode. The format is detected from the bytes, not the prefix.
- 3
Download
Check the preview and download the file.
What you get
Everything you need, nothing uploaded
Accepts data URLs, raw Base64 and URL-safe Base64.
Detects the real format from the file signature.
Preview and download with the correct extension.
Clear errors for truncated or invalid strings.
In depth
Common problems with Base64 images
- A string copied from a log or JSON may have line breaks or escaped slashes; the tool removes whitespace, but replace \/ with / before pasting.
- A truncated string decodes to a broken file. Check that the text ends cleanly, often with one or two = characters.
- A prefix that says image/png over JPG bytes is common; the detector uses the bytes.
Good to know
Why a Base64 string is longer than the file
Base64 writes every 3 bytes of the file as 4 text characters, so the text is about a third longer than the picture, plus a few = characters of padding at the end. That is the reason large images are rarely embedded in pages as Base64.
| Image file | Base64 characters |
|---|---|
| 10 KB | 13,336 |
| 100 KB | 133,336 |
| 1,000 KB | 1,333,336 |
In depth
Anatomy of a data URL
A data URL looks like data:image/png;base64, followed by the encoded text. The part before the comma names the type and the encoding; the part after it is the file. You can paste the whole thing or only the text after the comma, and the format is taken from the bytes in either case.
FAQ
Frequently asked questions
Can’t find an answer? The guides cover formats, sizes and privacy in depth.
Read the guidesIs my file uploaded?
No. Everything on this page runs in your browser and the file never leaves your device. The Network tab in the developer tools shows no upload while the tool works.
Why does it say the result is not an image?
The decoded bytes do not start with a known image signature. The string may be a different file type, an encrypted blob, or incomplete.
Can I decode very long strings?
Yes, within your browser’s memory. Strings of several megabytes decode in a second.
What is a data URL?
A data URL is a web address that holds the file itself: data:image/png;base64, followed by the Base64 text. Browsers display it like a normal image.
Why is the Base64 text a third longer than the image?
Base64 writes every 3 bytes as 4 characters, so the text is about 33 percent longer than the file, plus up to two = characters of padding.
Sources
Sources and further reading
- MDN: data: URLs (opens in a new tab)
- RFC 4648: Base16, Base32 and Base64 encodings (opens in a new tab)
- Wikipedia: data URI scheme (opens in a new tab)
Links checked 13 November 2026. Outside pages change, so check the date on them.
Related tools
More free tools
Done here? Make it look great.
Adjust, retouch and add effects in the full editor. Still 100% on your device.