Skip to content
SUMILORASUMILORA

Convert an image to Base64

Image tools

Turn an image into text you can paste directly into a stylesheet, a page or a JSON payload.

Runs in your browser

Nothing is uploaded. The work happens on your own device, so your file or text never reaches us.

About this tool

When inlining helps

An inline image costs no HTTP request, which is worth something for a tiny icon that appears on every page, or for an image inside an email template where external files may be blocked.

It also makes a file self-contained — useful for a single-file HTML document or a bookmarklet.

When it hurts, which is more often

Base64 is about 33% larger than the file it encodes, because it writes three bytes as four characters.

Worse, an inlined image cannot be cached separately. Every page that includes it carries the whole image again, and it blocks rendering of the stylesheet it sits in. Past a few kilobytes, a normal <img> tag wins comfortably.

Nothing is uploaded

The image is decoded and re-encoded by your own browser, on your own device. It is never sent anywhere, which is why these tools work with the network off and why there is no size tier or account.

For photographs that is not a small point: a picture from a phone usually carries the time it was taken and often the exact place. Sending it to a converter means handing that over too.

Questions

How big can the image be?

The picker allows up to 10 MB, but anything above roughly 10 KB is usually the wrong thing to inline for the caching reasons above.

Why is the Base64 bigger than the file?

It encodes three bytes as four printable characters, which is a 33% overhead. That is the price of representing binary data as text.

Can I use a data URI in an email?

In CSS backgrounds, often yes; as an img src, support is patchy and Outlook in particular blocks them. Test before relying on it.

Related tools