About the Image to Base64
The Image to Base64 converter encodes an image as a data URL (data:image/png;base64,โฆ) that you can paste directly into an <img src>, a CSS background-image or a JSON payload, with no separate file needed.
Base64 makes data about a third larger, so it is best for small icons and images.
How to use the Image to Base64
- Upload the image.
- Copy the data URL.
Example
Using it in CSS
.icon { background-image: url("data:image/png;base64,iVBORw0KGgoโฆ"); }
Frequently asked questions
Are my images uploaded?
No. The image is processed by your browser on your own device and is never sent to our server.
When should I avoid data URLs?
For large images: they cannot be cached separately and make HTML and CSS files heavier.
Can I decode it back?
Yes, with the Base64 to Image converter.