Base64 to Image Converter
Paste a base64 string or data URL and download the decoded image. Auto-detects PNG, JPG, GIF, WEBP, AVIF, HEIC, and SVG signatures with a live preview before download.
- Instant results
- Privacy-first
- No signup
Drag, drop, paste, or browse
JPG, PNG, WEBP, GIF, AVIF, and HEIC up to 50 MB. Paste from clipboard with Ctrl+V.
Image ↔ Base64
Encode an image as a base64 data URL, or paste base64 to download an image.
Full data URLs (data:image/...;base64,...) or raw base64 both work. The MIME type is taken from the prefix when present, otherwise auto-detected from the decoded bytes (PNG, JPG, GIF, WEBP, AVIF, HEIC, and SVG signatures are recognized).
Base64 to Image online with ImgShifter
Paste a base64 string - a full data URL or just the raw characters - and this tool decodes it in your browser, shows a live preview with the image's dimensions and file size, and lets you download the file with one click. It's the quick way to eyeball a data URL you found in someone's CSS, a JSON payload, or a stylesheet, and to pull the actual image back out of it.
Format detection is automatic. If the input carries a data:image/... prefix, that decides the file extension; if it's bare base64, the decoder sniffs the first bytes of the decoded blob against known magic numbers - PNG's 89 50 4E 47, JPG's FF D8 FF, GIF's 47 49 46, RIFF/WEBP, the ISO-BMFF brand AVIF and HEIC share, and the <?xml/<svg opening of SVG - and applies the right extension, falling back to .bin only when nothing matches. Whitespace and newlines in the string are stripped before decoding.
If a decoded file looks broken, the usual culprit is a truncated string: base64 has to be a multiple of four characters (padded with '='), so missing characters at the end produce a partial image. The decode itself runs entirely on your device via the browser's Fetch API on a data URL - nothing is uploaded. Verify in the Network tab or by going offline after the page loads. Free, no signup, no watermark.
Keep going
Related tools
Other ImgShifter tools people use alongside Base64 to Image.
Image to Base64
Convert an image to a base64 data URL, or decode a base64 string back to an image file. Useful for inline CSS, JSON payloads, and email signatures.
SVG Editor
Edit SVG source live in your browser. Recolor, tweak stroke widths, resize the viewBox, optimize, and export as SVG or PNG.
PNG to JPG
Convert transparent PNG images into lightweight JPG files in your browser.
Compress
Reduce image file size with a quality slider and instant before/after stats. Powered by the jsquash MozJPEG, libwebp, AVIF, and Oxipng encoders.
Frequently asked questions
Short answers for image workflows, privacy, and supported formats.
How do I convert base64 back to an image?
Paste your base64 string into the input box. The tool decodes it in your browser, detects the image format (from the data: prefix or by sniffing the decoded bytes), shows a live preview with dimensions and file size, and then a single click downloads the resulting image file. Full data URLs (data:image/png;base64,...) and raw base64 both work.
What formats can I decode?
Anything the browser can render plus formats with detectable magic bytes: PNG, JPG/JPEG, GIF, WEBP, AVIF, HEIC/HEIF, and SVG. The data: prefix takes precedence; if no prefix is present, the decoder sniffs the first 12 bytes of the decoded blob to identify the format and picks the right file extension automatically.
Do I need the data: prefix?
No. The tool handles both forms. If the input starts with data:image/png;base64, (or any other MIME type) the prefix is used to determine the file extension and the MIME stamp on the downloaded file. If the input is just raw base64 (no prefix), the decoder analyzes the first few bytes of the decoded data to detect the format and applies the correct extension.
How does the auto-detection work?
Every image format starts with a known byte signature - PNG begins with 89 50 4E 47, JPG with FF D8 FF, GIF with 47 49 46, WEBP with RIFF...WEBP, AVIF and HEIC use the ISO BMFF container with a 4-byte brand at offset 4-8, and SVG starts with <?xml or <svg. The decoder reads the first 16 bytes of the decoded blob and matches against these signatures - if no match is found, the file downloads as .bin.
Is my base64 input uploaded to a server?
No. The decoder runs entirely in your browser - the base64 string is decoded with the browser's Fetch API on a data URL, the resulting Blob is held in memory, and the download is initiated locally. Nothing is sent over the network. Open DevTools Network tab to verify, or disconnect from the internet after the page loads.
What's the maximum base64 size I can decode?
There's no hard cap; the limit is your browser's memory. A 10 MB image expands to roughly 13.3 MB of base64, which all modern browsers handle without trouble. Very large strings (hundreds of MB) may be slow to paste and parse. For embedding in real applications, base64 is best reserved for small images under a few hundred KB.
Why does my decoded file look corrupted?
The most common cause is a truncated or padded-incorrectly base64 string. Base64 must be a multiple of 4 characters (padded with '=' if needed). Whitespace and newlines inside the string are fine - the tool strips them before decoding - but missing characters at the end will produce a partial file. Also check that the data: prefix matches the actual content; a string labeled data:image/png that contains JPG bytes will download with the wrong extension.