01What is Base64 to Image Converter?
Base64 is how binary files ride along inside text. You find it in data URLs in CSS, in HTML emails, and in JSON APIs that return images as strings. This tool turns that text back into a picture you can see, measure and save. Paste either a full data URL, defined in RFC 2397 as data:image/png;base64, followed by the payload, or just the bare Base64. The tool removes whitespace and line breaks first. It also accepts the URL-safe alphabet from RFC 4648, where - and _ stand in for + and /, and it fixes missing = padding. Anything with other characters is rejected with an error. A data URL without the ;base64 marker is rejected too, since its content is not Base64 at all. After decoding, it identifies the format from the file signature, the fixed bytes every format starts with. It knows PNG, JPEG, GIF, WebP, AVIF, BMP and ICO by their headers. SVG counts when the decoded text starts with markup and contains an svg element. The label in a data URL is not trusted. We tested a PNG wrapped as data:image/jpeg, and the tool reported the mismatch and treated the file as PNG. If no signature matches, you get an error saying how many bytes decoded and that they are not a known image. For example, SGVsbG8gd29ybGQ decodes to 11 B of plain text and is refused. A good decode shows a preview and an Image Info card. The card lists format, pixel dimensions from the loaded image, decoded file size and extension. The bundled example is a 70-byte PNG holding a single 1 x 1 pixel. Download saves the file as decoded-image plus the detected extension. A few limits apply. Dimensions and the preview depend on your browser being able to draw the format, so an older browser without AVIF support will show a load error. Only those eight formats are recognised, so TIFF or HEIC data is refused even when it is valid. Escape sequences like a literal \n from JSON are not cleaned up, only real whitespace. The preview is always an img element, so scripts inside an SVG do not run on the page. Decoding happens in your browser with atob, and the image never leaves your machine.
Web developers, email template builders and API debuggers who need to see what an encoded image string actually contains. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Base64 to Image Converter
- Paste the string into Base64 Input, with or without the data:image prefix.
- Click Decode, or pick an example, which decodes straight away.
- Check the preview and the Image Info card for format, dimensions, file size and extension.
- Read any note about a mismatched data URL label.
- Click Download to save the file with its detected extension, or Reset to start again.
03Worked examples
- Input:
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg== - Result:
Format PNG, File Size 70 B, Extension .png - The tool's built-in example, a 1 x 1 pixel. Dimensions come from the browser, which reports 1 x 1 px.
- Input:
data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAA... (same PNG data) - Result:
The data URL says image/jpeg, but the bytes are PNG. The image is shown and saved as PNG. - The file signature wins over the declared MIME type.
- Input:
PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciLz4= - Result:
Format SVG, File Size 41 B, Extension .svg - Decodes to a minimal svg element. Detected from the text, not from a binary header.
- Input:
SGVsbG8gd29ybGQ - Result:
Decoded 11 B, but the data does not start with the signature of a PNG, JPEG, GIF, WebP, AVIF, BMP, ICO or SVG image. - Missing padding is fixed, but the bytes spell Hello world, so it is refused.
- Input:
data:image/png,abc - Result:
This data URL is not Base64-encoded (it has no ;base64 marker), so there is nothing to decode. - Plain data URLs without ;base64 are rejected.
- Input:
not base64!! - Result:
Invalid Base64 string. Make sure you paste a valid Base64-encoded image. - Spaces are stripped, but ! is outside the Base64 alphabet.
04Common use cases
- Looking at an inline icon buried in a CSS background-image rule to see what it actually is
- Recovering a signature or screenshot that a form stored as a Base64 column in the database
- Checking whether an embedded email logo is a tiny icon or a heavy photo before keeping it inline
- Saving an image that an image-generation or OCR API returned as a Base64 field in JSON
- Confirming that a data URL labelled image/jpeg really holds JPEG bytes and not a PNG
- Debugging a mobile app that sends camera photos as URL-safe Base64
05Tips
- Base64 adds about a third to the size of the bytes, so the File Size shown will be smaller than the character count above the input suggests.
- If a string copied from JSON fails, remove the surrounding quotes and any literal \n or \/ escapes. Real line breaks are stripped for you, escapes are not.
- A string with a single leftover character after the last full group of four is invalid Base64, so the tool rejects it. That usually means the copy was cut off.
- A downloaded SVG opened directly in a browser tab can run scripts it contains, even though the preview here cannot. Only open SVGs you trust.
- Inline images suit small icons. Larger images are usually better as separate files the browser can cache.
06Related concepts
Data URL, Base64, MIME type, Magic bytes, Inline images.
Frequently Asked Questions
What is Base64 to Image Converter?
Base64 to Image Converter is a free, browser-based developer tool on AIDToolStack. Convert Base64 strings to images It requires no installation or sign-up and works entirely in your browser.
Is Base64 to Image Converter free to use?
Yes. No sign-up, no fees and no usage cap.
Does Base64 to Image Converter store my data?
No. It runs in your browser; nothing is uploaded.