Image to Base64
Data URIs for HTML and CSS.
- 100% free
- No sign-up
- Runs in your browser
Embed images straight into code
A data URI puts the image inside your HTML or CSS, saving a network request — handy for tiny icons, email templates and single-file prototypes.
Base64 makes files about a third larger, so use it for small images only.
- 1
Choose an image
PNG, JPG, SVG, GIF or WebP.
- 2
Copy the code
Data URI, <img> tag, CSS or raw Base64.
- 3
Paste into your project
No separate file to host.
Frequently asked questions
When should I avoid Base64 images?
For large photos — they bloat the page and can't be cached separately.
Do data URIs work in email?
Many clients support them, but Gmail blocks them; hosted images are safer for newsletters.
Is my data uploaded anywhere?
No. Everything runs in your browser with JavaScript — nothing you type or open is sent to our servers.

