Base64 to image

Paste a Base64 string or a full data URI: preview the image instantly and download it as a file, with nothing uploaded anywhere.

🔒 Your string stays in your browser: it is never saved or sent to any server.

What a Base64 image is and where you'll run into one

Base64 is an encoding that turns the bytes of a file into plain text: you'll find it in HTML emails, in CSS with embedded images, in API responses, and in databases that store pictures as strings. A full data URI starts with data:image/png;base64, followed by the actual code. This tool accepts either the whole data URI or just the Base64 part, and detects on its own whether the decoded file is a PNG, JPEG, GIF, WebP, BMP, or SVG by reading its first few bytes.

Why the conversion sometimes fails

The most common problems are strings that got cut off mid-copy (valid Base64 has a length that's a multiple of 4, aside from trailing = padding), stray spaces or characters picked up during copy-paste, or code that is valid Base64 but doesn't contain an image at all — a PDF or a text file, for instance. The tool automatically strips whitespace and line breaks, and gives you a clear message whenever the string can't become an image.