How to use the Image to Base64 Converter
- To encode: drop an image and choose the output format (data URI, HTML, CSS…).
- Copy the result into your code.
- To decode: paste Base64 or a data URI and click “Convert to image”, then download.
About this tool
Base64 turns a binary file into plain text, so a small image can be placed directly inside HTML, CSS, JSON, an email template or a database field instead of being a separate file. A data URI like data:image/png;base64,… works anywhere an image URL is accepted.
Base64 makes files about 33% larger and the browser can’t cache them separately, so it’s best for small icons and logos (a few KB), not big photos. The decoder recognises PNG, JPG, GIF, WebP, BMP, ICO and SVG by their content and lets you download the original file. Everything runs locally — nothing you paste is sent anywhere.
Frequently asked questions
Why is the Base64 text bigger than the image?
Base64 uses 4 text characters for every 3 bytes, so it is about 33% larger than the original file.
Should I use Base64 images on my website?
Only for very small images such as icons. Large Base64 images make pages heavier and can’t be cached separately.
My Base64 won’t decode — why?
Usually part of the text is missing, or it isn’t an image. Paste the complete string, with or without the data: prefix.
Is my image uploaded?
No. Encoding and decoding both happen in your browser.