How to use the Image to Base64
- Select an image.
- Copy the generated Data URI or Base64 string.
- Use it in compatible HTML or CSS.
Frequently Asked Questions
Is the Base64 real?
Yes, it is generated from the selected file bytes.
Is there an upload?
No.
Should I Base64 huge images?
Usually no; Base64 increases data size.
Using Base64 images wisely
Base64 turns an image into text you can paste straight into HTML or CSS, which saves one network request. That is a good trade for tiny icons and logos, and a poor one for photos: Base64 makes the data about a third bigger and the browser cannot cache it separately.
Use the Data URI in an img tag's src or in CSS background-image. Keep embedded images under a few kilobytes, and compress the image first so the string stays short.