Skip to content
tecuy
Image & Media

Base64 to Image Converter

Decode a base64 image Data URL back into a real, downloadable image file — JPEG/PNG/WebP only, never SVG or other executable content.

What's accepted, and what isn't

Only data:image/jpeg, image/png, and image/webp base64 Data URLs are accepted. image/svg+xml is deliberately rejected — an SVG can contain executable script, and this tool never treats pasted data as trusted, executable content. The base64 payload is decoded with plain string/byte logic, never eval, fetch, or any HTML-rendering shortcut.

Decoded entirely in your browser — nothing you paste here is sent to a server.

Paste a base64 image Data URL and get back a real, downloadable image file, with a live preview and its actual decoded dimensions and byte size.

Only image/jpeg, image/png, and image/webp are accepted — image/svg+xml is deliberately rejected, since an SVG can contain executable script and this tool never treats pasted data as trusted content.

How to use the Base64 to Image Converter

  1. Paste a full Data URL that starts with data:image/png;base64, data:image/jpeg;base64, or data:image/webp;base64,.
  2. Click Decode.
  3. Check the type, pixel size, and byte size shown above the preview.
  4. Click Download to save the file, or Clear to start over.

Example: A 1×1 PNG

Paste data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII= and click Decode. The tool shows image/png, 1×1px, 68 B with a preview, and Download saves decoded-image.png.

Questions about the Base64 to Image Converter

Can I paste plain base64 without the data: prefix?
No. The input must have the form data:<mime-type>;base64,<data>. Add a prefix such as data:image/png;base64, in front of the raw string.
Why do I get a declared type mismatch error?
The tool checks the decoded file's own signature. If the prefix says image/jpeg but the bytes are a PNG, it stops and asks you to use the correct type in the prefix.
Do line breaks in the base64 cause problems?
No, whitespace and line breaks are removed before decoding. Characters outside standard base64 (A–Z, a–z, 0–9, +, /, and = padding), such as URL-safe - and _, are rejected, and the length must be a multiple of 4.