Base64 to Image Converter — Decode & Preview Online Free
Text · Image · File — URL-safe mode · auto-detect · live image preview — 100% browser-side
Paste text → get Base64
Real-time · No button click · 200ms debounce
Decode any Base64 string back to an image — paste Base64 or a full data URI and see the live image preview instantly. Auto-detects JPEG, PNG, GIF, WebP from magic bytes. Download the decoded image with the correct file extension. 100% browser-side.
What is Base64 Encoding?
Base64 encoding converts binary data into a string of 64 safe ASCII characters — A–Z, a–z, 0–9, +, and /. It is the standard way to embed binary content (images, files, certificates) inside JSON, XML, HTML, and email without breaking the format. The encoded output is ~33% larger than the original.
Standard vs URL-Safe Base64
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 (Base64URL) replaces +→- and /→_ and removes = padding. Use URL-safe mode for JWT tokens, OAuth tokens, and URL query parameters.
Frequently Asked Questions
How do I convert a Base64 string back to an image?
Switch to the Image tab, paste your Base64 string or data URI into the decode panel on the right. The tool detects the image format automatically from the binary signature and shows a live preview. Click Download to save the file.
What if I only have the raw Base64 without the data URI prefix?
Paste the raw Base64 string (without data:image/...;base64, prefix). The tool reads the first few bytes to detect the image format — JPEG (FF D8), PNG (89 50 4E 47), GIF (47 49 46), WebP (52 49 46 46). Preview and download work the same way.
Why does my Base64 image show a broken preview?
The Base64 may be corrupted (truncated or modified), may not be an image (use File tab for PDFs, ZIPs), or may be URL-safe encoded (enable URL-safe toggle). Try enabling URL-safe mode if your string uses - and _ instead of + and /.
Can I decode Base64 from a JSON API response to see the image?
Yes — copy the base64 field value from your API response, paste it here. The tool auto-detects format and shows the image. Useful for debugging API responses that return images as Base64 (avatar photos, signatures, QR codes, etc.).
What image types can be decoded from Base64?
JPEG, PNG, GIF, WebP, SVG, BMP — any image format that can be embedded in a data URI. The tool detects the MIME type from binary magic bytes, not from file extension or user input, so detection is accurate.