Base64 to Image
Decode a Base64 string or data URL back into a downloadable image.
Updated · Examples checked by automated tests
About Base64 to Image
Base64 image data turns up in API responses, database columns and email source. Reading it as text tells you nothing; you need to see the picture.
Paste the string and this tool decodes it, previews the result, reports the real dimensions and file size, and gives you a download with the correct extension.
How Base64 to Image works in your browser
Base64 text is decoded back into bytes in your browser. If you paste a full data URL, its declared type is used; if you paste raw Base64, the format is detected from the file signature in the first bytes — PNG, JPEG, GIF, WebP, BMP and SVG are recognised.
Whitespace is stripped automatically, and the decoded image is previewed with its real dimensions and size before you download it with the correct extension.
When to use it
- Seeing what image is stored in a database column or API response.
- Recovering an embedded image from email or HTML source.
- Checking that an encoded image is complete rather than truncated.
Worked examples
Decode a data URL copied from CSS
Settings: Default
Input
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=Expected output
Type: image/png
Decoded size: 68 bytesThe type is detected from the decoded bytes’ signature, not just the declared MIME type, so a mislabelled data URL is still recognised.
Spot a truncated string
Settings: Default
Input
iVBORw0KGgo*AAAAExpected output
That is not valid Base64. Check for a truncated string or stray characters copied from the surrounding code.Characters outside the Base64 alphabet, such as *, usually mean the string was cut or copied with surrounding code. The tool reports it instead of showing a broken image.
Limits and checks before you use the result
- Only image formats are previewed; other files that decode correctly are reported as not an image.
- URL-safe Base64 (- and _) is accepted and normalised.
- Very long strings can be slow to paste on phones.
Frequently asked questions
Do I need the data URL prefix?
No. Paste the raw Base64 and the tool detects the image type from the first bytes, or paste a full data URL and it will use the declared type.
Why does nothing render?
Usually the string is truncated or contains stray whitespace or quotes from the surrounding code. The tool strips whitespace automatically but cannot recover missing data.
Which formats can it detect?
PNG, JPEG, GIF, WebP, BMP and SVG are recognised from their signatures.
Related tools
Color Palette Extractor
Pull the dominant colors out of any image as a usable palette.
Favicon Generator
Generate every favicon size from a single image, plus the HTML.
QR Code Generator
Create QR codes for links, Wi-Fi, contacts and text, then download PNG or SVG.
Image Compressor
Shrink JPG, PNG and WebP files without leaving your browser.
Image Resizer
Resize images to exact dimensions or by percentage, offline.
Crop Image
Crop images to a selection or a fixed aspect ratio.