Image to Base64
Convert an image to a Base64 data URI you can drop straight into HTML or CSS. The file is read locally and never uploaded.
Convert an image to a Base64 data URI you can drop straight into HTML or CSS. The file is read locally and never uploaded.
Upload an image and it gets encoded as a Base64 data URI, a long text string that contains the whole image. Pick the output you want: a raw data URI, a ready-to-paste CSS background-image rule, or a full HTML img tag. Copy it with one click and drop it straight into your code.
Embedding a small image as Base64 saves an HTTP request, which can speed up the first paint for tiny icons, logos, or placeholder graphics. It's handy when you can't reference an external file, like in a self-contained HTML email or a single-file demo. It also lets you store an image inside a JSON payload or a CSS file.
Base64 encoding makes a file about 33 percent larger than the original binary, and inlined images can't be cached separately by the browser. For anything beyond small assets, a normal image file with its own URL is the better choice. As a rule of thumb, inline images under a few kilobytes and link to everything bigger.