Image to Base64

Choose an image to get its Base64-encoded data URI, ready to paste into an <img src>, a CSS background-image, or a JSON payload. This runs entirely in your browser — your image is never uploaded.

When to use a Base64 data URI

A data URI embeds an image's bytes directly inside your HTML, CSS or JSON as text, so the browser doesn't need a separate network request to fetch it — useful for small icons, inline email images, or quick prototypes. It's not a good fit for large photos: Base64 encoding inflates the file size by roughly a third, and the browser can't cache an inline image separately from the page that contains it. Untick the prefix checkbox if you only need the raw Base64 string, for example to pair with your own Content-Type header in an API.