Paste a Base64 string or data URI and preview the decoded image instantly — see its exact dimensions and file size, then download it as PNG, JPG, or WebP, or copy it back out as a data URI.
Base64 is a text-safe encoding scheme that represents arbitrary binary data — like an image's raw bytes — using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /, with = as padding). Images are frequently Base64-encoded so they can travel through systems designed to carry text rather than raw binary: embedded directly inside HTML or CSS as a data URI (avoiding a separate file request), included in JSON API responses, stored inline in a database text column, or attached to an email. The tradeoff is size — Base64 encoding inflates data by roughly 33% compared to the original binary — but the compatibility benefit of 'this is just text' often outweighs that cost for smaller images like icons, thumbnails, or logos.
Every standard image file format begins with a fixed, well-documented sequence of bytes that unambiguously identifies it, independent of the file extension or any declared MIME type. PNG files always begin with the same 8-byte signature (visible as 'iVBORw0KGgo' near the start of PNG Base64 data); JPEG files begin with the bytes FF D8 FF; GIF files begin with an ASCII 'GIF87a' or 'GIF89a' header; WebP files begin with 'RIFF' followed by 'WEBP' a few bytes later. This tool decodes your input's first several bytes and checks them against each of these known signatures in order, which is exactly how operating systems, image libraries, and browsers themselves determine a file's true format — far more reliably than trusting a file extension or a possibly-incorrect declared MIME type.
PNG uses lossless compression and supports full transparency (an alpha channel), making it the right choice for graphics with sharp edges, text, transparency, or where any quality loss is unacceptable — icons, logos, screenshots, and diagrams in particular. JPG uses lossy compression tuned for photographic content, achieving much smaller file sizes for photos at the cost of some quality loss and no transparency support at all. WebP, a more modern format, generally achieves smaller file sizes than both PNG and JPG at comparable quality and supports transparency like PNG, but has marginally less universal compatibility with older software, though virtually all modern browsers and platforms support it fully today.
Decoding Base64 image data back into an actual, downloadable file comes up in a range of everyday development and data-handling tasks: extracting an image that an API returned inline as Base64 rather than a URL, recovering an image embedded in a JSON export or database backup, converting a data URI copied from a webpage's source code back into a real file, or simply inspecting what an unfamiliar block of Base64 text actually contains before deciding what to do with it. Because this tool both previews and reports exact dimensions and file size, it also doubles as a quick way to verify that a piece of Base64 data really is the image you expect before you use it somewhere else.
Base64 encoding works by taking every 3 bytes of raw binary data and representing them as 4 text characters, which is why a Base64-encoded image is consistently about 33% larger, in character count, than the actual image file it represents. This tool reports the real, decoded byte size — the size the file would be if you saved it directly — specifically so you're not misled by the inflated length of the Base64 text itself. This distinction matters most when you're deciding whether Base64-embedding an image (versus linking to a separate file) is a reasonable size tradeoff for a specific use case.
This tool is the reverse of Image to Base64, which takes an uploaded image file and produces its Base64 and data URI representation. Together, the pair covers both directions of a very common workflow: encode an image to Base64 to embed it somewhere text-only, or decode a Base64 string back into a usable image file when you've received or extracted one. Both tools run the encoding and decoding entirely in your browser, so nothing about the image ever leaves your device.
Base64 to Image pairs naturally with these other image and encoding tools.