A Base64 to image converter can turn strict RFC 4648 image data into a validated, downloadable PNG, JPEG, GIF, or WebP file entirely in your browser.
Use the Base64 to Image Converter when an API response, JSON field, email template, clipboard snippet, browser-storage value, or development log contains image bytes as text and you need a real file for inspection. Paste the payload, convert it, review the detected format and preview, and download the original decoded bytes. No image data is uploaded to Lizely or sent to an external conversion service.

Choose a supported input form
The converter accepts two forms: a plain RFC 4648 payload or an RFC 2397-shaped data URL. The alphabet and padding rules follow RFC 4648 Base64, while data URLs follow the RFC 2397 data URL scheme.
| Input | Accepted form | Important conditions |
|---|---|---|
| Plain Base64 | Standard characters A–Z, a–z, 0–9, plus, and slash, with no data URL prefix. | Length must be divisible by four. Padding belongs only at the end when required, and unused pad bits must be zero. |
| Base64 data URL | An optional type/subtype, optional name=value parameters, exactly one terminal ;base64 token, a comma, and the payload. | The terminal ;base64 marker is case-insensitive. Parameters must appear before it, and the comma is required. |
| Outside the supported format | Wrapped or whitespace-containing Base64, Base64url symbols, percent-encoded payloads, and non-Base64 data URLs. | These variations are rejected rather than silently rewritten. |
Whitespace is never removed, so line breaks, spaces, and tabs cause errors. The minus and underscore characters used by Base64url are also invalid here, as are missing, surplus, or misplaced padding and non-zero unused pad bits. If a producer supplies wrapped MIME Base64 or Base64url, normalize it at the source or with a purpose-built text tool before converting it.
Convert and download the image
- Copy the complete Base64 value or data URL from its source. Do not add line breaks or remove characters that may be required for valid padding.
- Paste the text into the converter’s input field. For a data URL, include the prefix, comma, parameters, terminal ;base64 marker, and full payload.
- Select Convert to image. Parsing, Base64 decoding, format detection, and image validation happen locally in the active browser tab.
- Review the detected format, decoded width and height, decoded byte size, and preview before downloading anything.
- Select the download action. The saved file contains the original decoded bytes and receives an extension chosen from the verified file signature.
A preview and download are published only after the complete image passes browser decoding and reports positive dimensions. Editing the input immediately removes the previous preview, download, status, error, and busy state, preventing an outdated result from being mistaken for the current conversion.
How the real image type is determined
Base64 is treated as a byte encoding, not as a trustworthy file label. A data URL may declare image/jpeg while actually containing PNG bytes. In that case, the declared MIME value is shown as ignored, the PNG structure wins, the browser validates the PNG, and the download receives a .png extension.
| Detected format | Required structural checks |
|---|---|
| PNG | The complete eight-byte signature, a first IHDR chunk with the mandated length, and a terminal IEND boundary. |
| JPEG | Start-of-image bytes, a following marker, and terminal end-of-image bytes. |
| GIF | A GIF87a or GIF89a signature, enough bytes for the logical screen descriptor, and the stream trailer. |
| WebP | RIFF and WEBP markers, an exact RIFF byte count, and a bounded VP8, VP8L, or VP8X first chunk. |
These checks reject bare or truncated magic bytes, but they do not replace actual image decoding. The browser must also decode the complete Blob successfully. A malformed container that happens to pass the initial structural checks therefore still fails instead of appearing as a successful conversion.
Size and dimension limits
The converter checks the input length and expected decoded byte size before allocating decoded data, then checks dimensions after browser decoding. These limits do not guarantee that browser memory cannot be exhausted because a compact payload can expand before the post-decode dimension check.
- The input can contain at most 8,000,000 UTF-16 code units. The exact maximum is accepted, while a larger input is rejected.
- The decoded output can contain at most 5 MiB, equal to 5,242,880 bytes. Expected output size is calculated before allocating the byte array; the exact boundary is accepted and one byte beyond it is rejected.
- Oversized data is never sliced, shortened, sampled, or partially decoded to force a result.
- After browser decoding, width and height must each be no more than 20,000 pixels, and their product must be no more than 40,000,000 pixels. Exact limit pairs are accepted, while any excess is rejected.
These are decoded-file limits, not restrictions on the displayed preview box. A compact Base64 payload can still represent a large pixel surface, which is why both byte size and decoded dimensions are checked.
What the downloaded file preserves
The download contains the original decoded bytes rather than a newly rendered copy. The converter does not draw the image onto canvas, resize it, recompress it, recolor it, flatten transparency, or intentionally remove metadata.
- A downloaded GIF can retain its animation, and a PNG can retain alpha transparency and embedded chunks present in the source.
- Metadata display is outside the scope of the tool, so the image summary reports format, dimensions, and byte size rather than EXIF or other embedded details.
- The preview uses a constrained display size only for page layout. CSS does not resize the downloaded file, and the dimension summary refers to the real decoded resource.
If the preview succeeds but a PNG, JPEG, or WebP needs to be smaller, download it first and use the Image Compressor. If the dimensions need to change, use the Image Resizer. This converter cannot repair a corrupt file, optimize file size, change format, or guarantee that every other application will accept the result.
Strict errors and what to fix
A conversion error can indicate either invalid transport encoding or damaged image data. The converter reports the conditions distinctly rather than guessing how to repair them.
- Transport errors: Empty input, input over the character limit, illegal whitespace, an invalid Base64 alphabet, missing or misplaced padding, surplus padding, or non-zero unused pad bits.
- Data URL errors: A missing comma, invalid type/subtype syntax, malformed parameters, a duplicate ;base64 token, a parameter after ;base64, a percent-encoded payload, a non-Base64 data URL, or more than one terminal ;base64 token.
- Size errors: Decoded output above 5,242,880 bytes or decoded dimensions beyond the documented width, height, or total-area limits.
- Image errors: An unrecognized or structurally incomplete container, or bytes that the browser cannot decode as a complete image.
When the source provides wrapped MIME Base64 or Base64url, fix the encoding at its source or normalize it with a purpose-built text tool first. The converter deliberately does not rewrite the payload. Starting a new conversion also revokes the previous temporary object URL, and a delayed result from older input cannot replace the current state. No failed conversion keeps an earlier successful download visible.
Privacy and appropriate use
Base64 increases transport size and is not usually the most efficient way to store large images. For normal website delivery, use an image file and an appropriate URL where possible. Use this converter for inspecting, recovering, debugging, and handing off image data that is already encoded.
Treat unknown image data with the same care as an unknown downloaded file. Browser decoding is not malware analysis, content moderation, steganography detection, or a guarantee that an image is safe or truthful. Avoid pasting sensitive material into shared devices even though the conversion itself remains local.
The decoded image stays in the active browser tab and is not retained by the tool. Temporary object URLs are revoked when replaced, after failed validation, and when the tool closes. With browser-local processing, the complete workflow stays focused on the encoded value you already have.
Related reading: Image to Base64 for Beginners: A Step-by-Step Start.
Related reading: Base64 to Image on Android: Decode and Save.