Free image to Base64 encoder
This tool converts an image into a Base64 data URI — a single text string that contains the entire picture. Once encoded, you can paste it directly into your HTML or CSS to embed the image inline, with no separate file and no extra network request. It's ideal for small icons, logos, email graphics, and simple background patterns. Everything happens right in your browser using the FileReader API, so your image is never uploaded, stored, or shared — it stays completely private on your device.
How to convert an image to Base64
- Click Choose an image, or drag and drop a file onto the drop zone.
- See the live preview along with the file's name, type, and size.
- Copy the full Base64 data URI with the Copy button.
- Or grab the ready-to-paste HTML or CSS snippet instead.
When to inline images as Base64
Base64 encoding adds about 33% to a file's size, so it works best for small assets. Inlining a tiny icon avoids an extra HTTP request, but embedding a large photo bloats your markup and prevents the browser from caching it separately. As a rule, inline small graphics and keep big images as regular files. Very large files still encode here — the resulting string is simply long, so expect a lengthy data URI.
Related tools
Need to work with raw Base64 text rather than images? Our Base64 encoder and decoder converts plain text and data URIs in both directions. And if you're embedding a link instead of an image, the QR code generator turns any URL into a scannable code — both run entirely in your browser, too.