Image Tools
Base64 to Image
Decode a Base64 string or data URL to an image in your browser. Auto-detects PNG, JPG, GIF, WEBP, AVIF, BMP, ICO, and SVG, then previews and downloads the file.
Try a sample
Load an example to see how data URLs and raw Base64 are handled.
How to use
- Paste a Base64 string or a full data URL into the input box on the left. Both 'data:image/png;base64,...' and a bare Base64 payload are accepted.
- The tool normalizes whitespace, fixes padding, and detects the image format from the magic bytes (PNG, JPG, GIF, WEBP, AVIF, BMP, ICO, SVG, and more).
- Read the preview, the detected MIME type, file extension, decoded byte size, and pixel dimensions on the right.
- Click Copy data URL to grab a normalized data URL ready to paste into HTML or CSS, or click Download to save the decoded image to your device.
- Use the sample buttons at the top to see how PNG, raw Base64, and GIF inputs are handled.
About this tool
Base64 to Image decodes a Base64 string or a full data URL back into a real image you can preview and download. Paste either form: a complete data URL like data:image/png;base64,iVBOR..., or just the Base64 payload by itself with no prefix. The tool normalizes whitespace, line breaks, surrounding quotes, and URL-safe Base64 (the - and _ variant produced by some encoders), then re-pads the string to a multiple of four so encoders that strip = padding still decode cleanly. Once the bytes are decoded, the format is detected from the magic bytes at the start of the file (the PNG signature, the JPEG FF D8 marker, the GIF87a and GIF89a headers, the RIFF/WEBP container, the BMP, ICO, AVIF, HEIC, TIFF, and SVG signatures) so the preview, the rendered MIME type, and the download extension are based on what the file actually is, not just what the data URL header claims. When the declared header and the detected bytes disagree, a warning surfaces both values and the tool uses the detected one. The right-hand panel shows a checkered preview, the detected format and extension, the decoded byte size, the pixel dimensions once the browser loads the image, and the length of the normalized Base64 payload. A normalized data URL is shown at the bottom with a copy button so you can paste a guaranteed-valid data URL into HTML, CSS, JSON, SVG, or markdown, and a Download button writes the bytes to disk with the right extension. Useful when you need to inspect a Base64 payload from a JSON API, save an icon embedded in CSS, recover an image from a stored data URL, sanity check an OpenAI or Stable Diffusion response, view a screenshot pasted as Base64 in a chat log, or convert a developer tool's output back into a real PNG. All decoding runs locally in the browser using atob and the File and Blob APIs, so the Base64 you paste never leaves your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Image to Base64
Encode images as Base64 data URIs with CSS and HTML snippets.
Open tool
DeveloperBase64 Encoder Decoder
Encode and decode Base64 with full Unicode.
Open tool
ImageImage Format Converter
Convert PNG, JPG, and WebP locally with quality and transparency controls.
Open tool
DeveloperURL Encoder Decoder
Encode and decode percent-encoded URLs.
Open tool