Image to Base64

Turn any image into a Base64 data URI you can embed in HTML or CSS. Need the reverse? Use Base64 to Image.

How to use the Base64 data URI

Copy the generated string and drop it straight into an image tag's src attribute or a CSS background-image. Because the data is inline, the browser renders it without a separate network request — handy for tiny icons, but avoid it for large images (see the FAQ).

Image to Base64 — FAQ

How do I convert an image to Base64?+

Choose an image above and the tool instantly produces a Base64 data URI you can copy. Everything runs in your browser, so the image is never uploaded.

What is a data URI?+

A data URI embeds a file directly in text using the form data:[mime];base64,[data]. You can paste it into an <img src>, CSS background, or any place that accepts a URL.

Should I Base64-encode large images?+

Only small ones. Base64 increases size by ~33% and inlined images can’t be cached separately, so reserve it for tiny icons/sprites. Larger images are better served as normal files.

Which image formats are supported?+

Any format your browser can read — PNG, JPEG, GIF, WebP, SVG and more. The resulting data URI keeps the original MIME type.