Convert an image into a Base64 data URI for embedding in HTML, CSS or JSON, entirely in your browser.
Embedding images as Base64 avoids an extra request but increases size by about a third. Best for small icons.
How to use the Image to Base64
Choose an image from your device.
Copy the data URI, or the ready-made CSS snippet.
Paste it into your HTML, CSS or JSON.
Frequently asked questions
No. The image is read entirely in your browser, so it never leaves your device.
For small images like icons, where avoiding an extra network request is worth the size increase. For large images, a normal file is better.
Base64 encoding adds roughly 33 percent overhead because it represents binary data using a limited text alphabet.
An image to Base64 converter that produces a data URI and a ready-to-use CSS background snippet for embedding images inline.
It runs locally in your browser, so your images stay private.
Related tools
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, right in your browser.
Convert colors between HEX, RGB and HSL with a live preview.
Convert Unix timestamps to human dates and back — UTC, local, ISO 8601 and relative time. Seconds and milliseconds are auto-detected.
Percent-encode and decode URLs and URL components, UTF-8 safe.
We use essential cookies to run the site. With your consent we also load Google AdSense, which sets advertising cookies. See our privacy policy.