Image to Base64 Converter
Embed a small image directly in your HTML, CSS or JSON. Choose a file and copy the Base64 in the form you need.
Your data stays on your device.
Features
- Data URI, raw Base64, HTML tag and CSS rule
- PNG, JPG, WebP, GIF, SVG and ICO
- One-click copy for each output
- Runs on your device, so the image is never uploaded
How to use Image to Base64
- Choose or drop an image.
- Pick the output you need.
- Click Copy.
Frequently asked questions
When should I embed an image as Base64?
For small images such as icons, where saving a separate request is worth it, or where a file cannot be attached, such as inside a JSON message or an email template.
Why is the Base64 version larger than the file?
Base64 writes every 3 bytes as 4 characters, so the result is about a third larger than the original file.
Is there a size limit?
This tool accepts images up to 5 MB. For anything over about 100 KB, a normal image file is usually the better choice.