Base64 to Image Decoder
Decode a Base64 string back to a viewable image.
About Base64 to Image
Paste a Base64 encoded image string (with or without the data URI prefix) and instantly decode it to a viewable image. Preview the result before downloading as PNG or JPEG. Useful for debugging API responses, inspecting email templates, or recovering images stored as Base64 in databases.
Use Cases
Decoding Base64 images from API responses, recovering images stored as strings in JSON or database records, debugging email template images, previewing Base64 data URIs from CSS or HTML source code.
How It Works
The tool detects whether the input includes a data URI prefix. If not, it assumes image/png. It constructs a data URI, sets it as the src of an Image element, and renders it on a canvas for preview and download.
FAQs
Does it need the data:image prefix?
No. You can paste just the raw Base64 string without the prefix. The tool will default to PNG. If the image type is different, include the full data:image/jpeg;base64,... prefix for correct rendering.
What image types can be decoded?
Any image type that is Base64 encoded — JPEG, PNG, GIF, WebP, SVG, and BMP are all supported.
Why does my image look corrupted?
This usually means the Base64 string is truncated or contains extra whitespace/newlines. Ensure you copy the complete string without any line breaks added by your source editor.