Decode and encode Base64 images
Two tools on one page. Base64 → image takes a string you found in an API response, a database, an email source or a web page and shows the picture, with its format and dimensions, ready to download. Image → Base64 does the reverse: pick an image and copy the text to paste into HTML (<img src="data:…">), a CSS background-image, a JSON payload or a test fixture.
How to convert Base64 to an image
- Open the “Base64 → image” tab. Paste the text. A full data URI or bare Base64 both work.
- Click “Show image”. The picture appears with its format, size in pixels and file size.
- Download. The file is saved with the correct extension: PNG, JPG, GIF, WebP, BMP, SVG or ICO.
When Base64 images make sense
- Good use
- Small icons and logos inside HTML emails, single-file HTML pages, CSS sprites, JSON APIs that cannot carry binary files, test data.
- Poor use
- Photos and large images on web pages – they add a third to the size, cannot be cached separately and delay rendering. Link to a normal file instead, compressed with reduce image size in KB.
Frequently asked questions
What is a Base64 image?
It is an image file written out as plain text using 64 safe characters, so it can be placed directly inside HTML, CSS, JSON or an email. A data URI adds a prefix like data:image/png;base64, that tells the browser the format.
Why is the Base64 text bigger than the image?
Base64 uses 4 characters for every 3 bytes, so it is about 33 % larger than the original file. Use it for small images such as icons; link to normal files for photos.
My Base64 won’t decode – why?
Usually part of the string is missing, or it contains line breaks, quotes or a stray character from copying. The tool ignores spaces and line breaks and accepts URL-safe Base64 (- and _), but the string must be complete.
How does the tool know the image format?
From the data:image/… prefix if present; otherwise from the first characters of the data, which identify PNG, JPEG, GIF, WebP, BMP, SVG and ICO.
Is my data sent anywhere?
No. Everything runs in your browser.