Base64 to Image Decoder
Developer ToolsPaste a Base64 string or data URI, see the image, and download it with the right extension.
Decoded in your browser; nothing is uploaded. Only the image type and size are saved to your past runs. Privacy
About
What the Base64 to Image Decoder does
The Base64 to Image Decoder turns Base64 text back into an image you can see and save. It accepts a full data URI or the bare Base64, including URL-safe Base64 and text with line breaks. The image type is detected from its first bytes, so PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG download with the right extension. Dimensions and size are shown, and invalid characters are reported with their position.
Steps
How to use it
- 1Paste the Base64 text or data URI.
- 2Check the preview, type and dimensions.
- 3Press Download image.
Example
A real run
Input
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAHklEQVR42mP4+vk/SYiBjhpyNW7iQaMaho+GQZP4AEAYU9uYjwmBAAAAAElFTkSuQmCC
Output
Decoded a PNG image · 16×16 · 87 bytes · download as image.png
The data URI decodes to a 16×16 PNG; the dimensions are read straight from the PNG header, and the download gets the .png extension.
Options
Every setting, and when to use it
- Type detection
- Each format starts with known bytes: PNG data begins iVBOR in Base64, JPEG /9j/, GIF R0lGOD. The decoder reads those bytes, so a missing or wrong data-URI type does not matter.
- Lenient input
- Line breaks, spaces, missing = padding and URL-safe characters (- and _) are accepted, because Base64 copied from emails, logs and JSON often has them.
Good to know
Common problems and limits
Text up to 20 MB. Previews are shown only through an <img> element from a local blob URL, so an SVG's scripts never run.
If the bytes are not a recognized image, the page says so instead of showing a broken image; the data may be cut off or not an image at all.
To create Base64 from an image, use Image to Base64; for Base64 text that is not an image, use Base64.
Audience
Who uses it
- DevelopersSee what an image field in an API response, a database row or a test fixture actually contains.
- Support engineersRecover screenshots or attachments that arrive as Base64 in logs, tickets or exported emails.
- DesignersSave inline images from HTML or CSS source as proper files.
FAQ
Frequently asked
How can I tell the image type from Base64?
From the first characters, which encode the file's signature bytes: iVBOR is PNG, /9j/ is JPEG, R0lGOD is GIF, UklGR is WebP (or another RIFF file) and PHN2 is SVG text. The decoder checks the bytes and tells you the type.
Why is my decoded image broken?
Usually the text is truncated, often by a length limit in a log or a database column, or it is URL-safe Base64 being read as standard Base64. This decoder accepts both alphabets and reports where invalid characters are.
What is a data URI?
A URL that carries its content inline: data:image/png;base64, followed by the Base64 bytes. Browsers display it like any image URL. Paste it here as is, or only the part after the comma.
How do I decode Base64 to an image in Python or JavaScript?
Python: open("out.png", "wb").write(base64.b64decode(data)). Node.js: fs.writeFileSync("out.png", Buffer.from(data, "base64")). In a browser, set an <img> src to the data URI.
Is it safe to decode an SVG from an unknown source?
Here, yes: SVGs are previewed only through <img> from a blob URL, where scripts and external loads are disabled. Opening the downloaded SVG directly in a browser tab is different, so treat unknown SVG files with care.
Is my data sent anywhere?
No. Decoding happens in your browser. Only the image type and size are saved to your past runs when you download.
Automation: an MCP tool base64_to_image(text) → file and an n8n node are planned for this tool.