Base64 to Image
Paste a Base64 data URL or raw Base64 string to decode and preview the image inline.
Base64 input (data URL or raw Base64)
Paste a Base64 string above and click Decode.
What is Base64 to Image?
Base64 to Image decodes a Base64-encoded data URL back into a viewable and downloadable image. When an API returns image data as a Base64 string, when you need to verify what an encoded image looks like, or when you find a data URL in HTML or CSS source and want to see the actual image, this tool renders it instantly in your browser. The decoding happens entirely client-side — the string never leaves your device.
How to use this tool
- Paste your Base64 data URL into the input field. The full format is
data:image/png;base64,iVBORw0KGgo... - You can also paste just the raw Base64 string without the
data:...prefix — the tool defaults to PNG in that case. - Click Decode.
- The image is rendered in the output panel.
- Right-click the image to save it, or use your browser's download option.
Understanding MIME types in data URLs
The MIME type in the data URL tells the browser what kind of file the data represents. Common image MIME types:
data:image/png;base64,...— PNG image (lossless, supports transparency)data:image/jpeg;base64,...ordata:image/jpg;base64,...— JPEG image (lossy, no transparency, smaller file size for photographs)data:image/gif;base64,...— GIF image (limited colours, supports simple animation)data:image/webp;base64,...— WebP image (modern format, better compression than JPEG and PNG)data:image/svg+xml;base64,...— SVG vector image encoded as Base64
If the MIME type is missing or wrong, the browser may refuse to render the image or display a broken image icon. This tool detects the content type from the data URL prefix and displays it alongside the decoded image.
Common debugging scenarios
- API returning Base64 images: Some APIs return avatar photos, generated charts, or QR codes as Base64 strings in JSON responses. Paste the string here to verify the image looks correct before writing client-side rendering code.
- Extracting images from HTML source: When scraping or inspecting a page that inlines images as data URLs, paste the data URL here to preview and save the image as a file.
- Verifying encoded assets: When using the Image to Base64 tool to generate a data URL, use this tool to confirm the round-trip is correct — encode, then decode and compare with the original.
- Database-stored images: Some applications store images as Base64 strings in the database. This tool lets you quickly inspect a stored value without writing decoding code.