Image to Base64

Convert images to Base64 data URIs for inline embedding.

Drop an image and get its Base64 data URI, ready to paste into HTML <img src>, CSS background-image, or a JSON field. Works for PNG, JPG, GIF, WebP, SVG, AVIF, and BMP, anything your browser can read.

Common use cases: inlining tiny icons to save a network request, embedding images in email templates, packing small assets into a single HTML file for a one-page prototype, and including images in JSON payloads sent to APIs that don't accept multipart uploads.

Upload Image

Base64

Upload an image to convert

Frequently asked questions

What's a "data URI" and when should I use one?
A data URI embeds the image bytes directly in the HTML/CSS as a Base64 string, no separate network request needed. Best for tiny icons, single-use background images, and email templates where external images get blocked. For anything more than a few KB, a regular file reference loads faster.
Does the file get uploaded anywhere?
No. The image is read locally via the browser's FileReader API and encoded in memory. Nothing is uploaded, safe for sensitive screenshots and internal assets.
Why is the Base64 string ~33% larger than the file?
Base64 encodes 3 binary bytes as 4 ASCII characters, so the encoded size is always ~133% of the original. Gzip compression reclaims most of that when the response is compressed, but the in-memory and on-disk cost of the encoded form is still larger.
Which formats are supported?
Anything the browser can read: PNG, JPG, JPEG, GIF, WebP, SVG, AVIF, and BMP. The encoded output works wherever data URIs do, <img src>, CSS background-image, inline email, JSON payloads.