Image to Base64 / Data URI
Convert an image to a Base64 string / Data URI to embed directly in HTML/CSS.
Convert an image into a Base64 string (data URI) to embed directly in HTML/CSS without a separate file.
How to use Image to Base64
- Choose an image.
- Copy the data URI string.
- Paste it into a src attribute or a CSS background property.
Frequently asked questions
When should I embed an image as base64?
For small icons or images, to reduce the number of requests; avoid it for large images, since a long base64 string bloats your HTML/CSS file.
🔒 Image to Base64 / Data URI runs entirely in your browser — the data you enter is not sent to any server. Free, no sign-up required. See145 free dev tools more.