Base64 to Image Converter
Convert Base64 to an image online — paste raw Base64 or a data:image URI, preview the decoded picture, and download it. Decoding runs in your browser.
Both forms work — with or without the data:image/…;base64, prefix. The image is decoded locally in your browser.
Your images are processed directly in your browser. They are not uploaded to our servers.
How to use
Four steps from pasted data to a downloaded image file.
- Paste Base64Drop the string into the input — data URI or raw payload both work.
- Decode itThe payload is decoded locally the moment you paste.
- Preview the imageSee the picture with its detected format and dimensions.
- Download itSave the decoded file with the correct extension.
- Every step runs locally in your browser.
Key Features
Decoding and previewing happen entirely in your browser.
- Data URI and raw inputBoth forms are accepted — the prefix is optional.
- Format detectionThe image type is identified from the data itself.
- Instant previewThe decoded picture appears as you paste.
- Downloadable outputSave the file locally with the correct extension.
Troubleshooting
What this decoder accepts, how it picks the format, and why a payload can fail.
- The data: URI prefix is optionalPaste the whole data URI (data:image/png;base64,…) or only the payload after the comma — both produce the same decoded bytes. A prefix that carries a charset as well — data:image/png;charset=utf-8;base64, — is recognised too.
- Line breaks and spacing are ignoredWhitespace and line breaks anywhere in the payload are removed before decoding, so Base64 wrapped at 76 characters — or copied out of a PEM block, an email or a wrapped config file — can be pasted as it is and still decodes to the identical bytes.
- URL-safe and unpadded payloads are acceptedIf the string uses - and _ instead of + and / (URL-safe Base64, common in JWTs and query strings), those characters are converted back to the standard alphabet before decoding. A payload with its trailing = padding removed also decodes, so values copied straight out of a URL or a token work as they are.
- How the image format is foundA data:image/… URI states its type and that type is used first — the “Format detected via” row under the preview shows which source was used. With no usable prefix, the file signature in the decoded bytes decides: PNG, JPEG, GIF, BMP, WebP and AVIF are recognised this way, and SVG by its text. The detected type also sets the downloaded file's extension; bytes the browser can display but that match no known signature are still saved as decoded-image.png.
- The string looks truncated or malformedThe most common failure is a payload that was only partly copied. A clipped string usually stops being a valid group of four characters, and the tool reports it as truncated or malformed — so check both ends of what you pasted against the original value. Removing only the trailing = padding is harmless; a half-deleted = left at the end is not.
- Characters that are not Base64A payload containing %, quotes, angle brackets or the curly quotes some documents and chat apps insert is rejected with “This doesn't look like valid Base64”. Values that travelled through a URL or a form fail in a related way: percent-decoding turns + into a space, and a space is ignored here as whitespace, so those bytes are lost. Re-copy the value from its original source, or paste the raw payload instead of a percent-encoded data URI like data:image/svg+xml,%3Csvg… — only data:…;base64, URIs contain Base64.
- It decodes but is not an imagePayloads that decode cleanly but hold something other than an image — a PDF, a ZIP or an arbitrary file — are reported as decoding successfully but not being an image the browser can display. The Base64 itself is intact in that case; it simply is not picture data.
Frequently asked questions
PNG, JPEG, GIF, BMP, WebP, AVIF and SVG — anything your browser can display. With raw input the format is detected from the file's signature bytes.
Yes. A full data URI (data:image/png;base64,…) or the raw Base64 payload both work — the prefix is optional.
Yes — the Download button saves the decoded bytes as a file with the correct extension for its detected format.
The string is usually truncated or altered during copying. Make sure the entire payload — from start to the final padding = signs — was pasted.
No. Decoding and previewing happen entirely in your browser; the payload never leaves your device.
Yes. Whitespace and line breaks anywhere in the payload are removed before decoding, so Base64 wrapped at 76 characters, or copied out of an email or a config file, works exactly as pasted. URL-safe characters (- and _) are converted back to the standard alphabet first, and a payload whose trailing = padding was stripped still decodes.
The type declared in the data URI prefix is used first, and the “Format detected via” row under the preview says so. When the prefix is wrong, the reported format — and the extension used for the downloaded file — follow the prefix rather than the actual bytes, so paste the raw payload without the prefix to let the file signature decide.