How to Convert an Image to Base64
A Base64 string lets you embed a small image directly in HTML, CSS or JSON without a separate file.
Open the free Image to Base64
Step by step
- Open Image to Base64 and select your image.
- Wait for the string to be created.
- Copy the result.
- Paste it into your code as a data URI.
Tips
- Use it only for small images, because Base64 is about a third larger than the file.
- Compress the image first.
- Keep large pictures as normal files so browsers can cache them.
- Test the result in your page.
Frequently asked questions
What is a data URI?
A way to put file data directly inside a web page or stylesheet.
Is the image uploaded?
No.
Is it free?
Yes.
Related