🧰FileTools
ENΒ·ESΒ·PTΒ·DEΒ·JAΒ·δΈ­ζ–‡

Base64 to Image Decoder

Decode Base64 image strings to PNG, JPG, WebP or GIF files. Preview the image instantly. 100% browser-based β€” no upload, no server.

πŸ”’ Your files never leave your deviceMax 50MB.txt Β· .json Β· .b64

Content is for reference only.

⬆

Drop your file here, or click to browse

Supports: .txt, .json, .b64 Β· Max: 50MB

πŸ“˜ How to Use

Guide available in English. Machine translation coming soon.

How to Decode Base64 to Image

What This Tool Does

The Base64 to Image Decoder takes a Base64-encoded image string (with or without the data URI prefix) and converts it back into a downloadable image file. It auto-detects the image format from the data URI mime type or the Base64 content itself, and lets you override the output format if needed. A live preview shows the decoded image immediately.

Why Decode Base64 Images?

Base64 encoding is used everywhere: API responses that embed images inline, JSON payloads from AI services, email attachments (MIME), CSS data URIs, database BLOB exports, and HTML/JS bundles that inline small images. When you need the actual image file β€” to inspect it, edit it, or save it locally β€” decoding by hand is tedious and error-prone. This tool handles the parsing, format detection, and file generation in one click.

100% Browser-Based

Decoding runs entirely in your browser. The Base64 string is decoded into a binary Blob using the Fetch API or atob, and the image is rendered via createImageBitmap for preview. No data is transmitted anywhere β€” safe for API keys embedded in JSON payloads or internal service responses.

How to Use

  1. Paste your Base64 string into the input area. Include or omit the data URI prefix (data:image/png;base64,...) β€” both work.
  2. Choose output format: auto (detects from data URI or content), or force png/jpg/webp/gif.
  3. Click Convert. The image preview appears instantly, with a download button.

Format Detection

  • If the input has a data URI prefix (data:image/jpeg;base64,...), the mime type is extracted from there.
  • Without a prefix, the tool checks magic bytes: PNG (iVBOR), JPEG (/9j/), GIF (R0lGOD), WebP (UklGR).
  • Auto mode uses detected format; manual override forces the selected format regardless.

Tips

  • Large Base64 strings (>10MB decoded) may take a few seconds; the progress bar shows decoding status.
  • Invalid Base64 input reports a clear error instead of producing a corrupt file.
  • The tool strips whitespace and newlines from the input before decoding, so wrapped Base64 (common in email and JSON) works without preprocessing.

❓ Frequently Asked Questions

Does it work without the data:image/png;base64, prefix?

Yes. The tool auto-detects the format from magic bytes in the decoded content. You can also manually select the output format.

Is my Base64 data sent to a server?

No. All decoding and preview rendering happens in your browser. Your data never leaves your device.

Can I decode a Base64 string from a JSON API response?

Yes. Extract the Base64 value from the JSON, paste it here, and convert. The tool handles raw Base64 without requiring the data URI wrapper.

What formats are supported?

PNG, JPEG, WebP, and GIF. Auto-detection identifies the format from magic bytes or the data URI prefix.