Image to Base64
Drop an image to get its Base64 string, a ready-made data URL, and HTML and CSS snippets you can paste straight into your code.
Runs in your browser. Nothing you type or drop here is sent anywhere.
About Image to Base64
Embedding a small image as Base64 lets you put it directly inside HTML, CSS, JSON or an email template, with no separate file to host.
It works best for small icons and logos. Base64 is about a third larger than the original file, so large photos are better served as normal image files.
Frequently asked questions
What's the difference between Base64 and a data URL?
A data URL is Base64 with a prefix that says what it is, like data:image/png;base64,…. Browsers can use a data URL anywhere an image URL is expected.
Which image formats work?
Any image your browser can open: PNG, JPG, WebP, GIF, SVG, AVIF, ICO and more.
Is there a size limit?
No fixed limit, but very large images produce very long strings that some editors struggle with.