Image to Base64
Turn an image into a Base64 data URI for HTML or CSS. Free, no sign-up, and your files never leave your device.
🔒 Processed in your browserAbout Image to Base64
Image to Base64 turns a picture into text that you can paste straight into HTML, CSS or JSON. This is useful for small icons and email templates. Your files are processed on your own device. Nothing is uploaded to our servers.
How to use Image to Base64
- Choose an image.
- Pick the output: data URI, raw Base64, HTML or CSS.
- Copy the code.
Frequently asked questions
When should I use Base64 images?
Use them for very small images like icons, where saving an extra network request matters. Large images grow about 33% bigger as Base64.
What is a data URI?
A data URI is a Base64 string with a prefix such as “data:image/png;base64,” that browsers can display directly.
Is there a size limit?
No hard limit, but strings for images over 1 MB become very long and slow to paste.
More image tools
See all →Image Compressor
Reduce JPG, PNG and WebP size while keeping them sharp.
Image Resizer
Resize images to exact pixels or a percentage.
Image Converter
Convert between JPG, PNG and WebP in one click.
HEIC to JPG
Open iPhone HEIC photos anywhere by converting to JPG.
Crop Image
Crop to a free shape or a fixed ratio like 1:1 or 16:9.