jakup

Everything runs in your browser. Images are never uploaded to a server.

When to use an image as Base64

Turning an image into a Base64 string makes it text instead of a file, so you can place the image directly inside HTML, CSS or JSON. It is the value that starts with data:image/png;base64,…

Embedding a small icon or logo as a data URI removes one image request and speeds up loading. It also helps for email signatures, Markdown documents, and any time you need to share a result without hosting the image somewhere.

The trade-off is about 33% more size, and the browser cannot cache it separately — so it is a poor fit for large photos. Keep it to small images of a few tens of KB. Conversion happens only in your browser; the image is never uploaded.

Frequently asked questions

How much bigger does an image get as Base64?

Every three bytes become four characters, so it grows by about a third. A 100 KB photo turns into roughly 137 KB of text. After a conversion this tool shows the original size and the Base64 size side by side, so you can see the real difference.

What does a data URL look like?

It starts with data:, then a type such as image/png, a semicolon, the word base64, a comma, and the encoded bytes. This tool can output that value as a plain data URL, as raw Base64, wrapped in an img tag, or as a CSS background-image rule.

Why does my Base64 image not display?

Usually the data:image/png;base64, prefix is missing, or the string was truncated. If you paste raw Base64 here, the tool guesses the format from the opening characters: PNG data starts with iVBORw0KG, JPEG with /9j/, and GIF with R0lGOD.

What is the maximum image size?

It accepts image files up to 5 MB each. Aside from that limit, large photos are simply a poor fit for Base64. The technique pays off for icons, logos and small thumbnails of a few tens of KB; anything larger is better served as an ordinary file.

What does it mean that inline images are not cached?

The image is no longer a separate file but text inside your HTML or CSS, so the browser cannot store it on its own. It is downloaded again with every page load, and changing one image forces the whole document to be fetched again.

How do I turn a Base64 string back into an image file?

Switch to decoding and paste the Base64 or the data URL. A preview appears with a download button, and the extension follows the detected type, with jpeg saved as jpg and svg+xml as svg. This step also happens entirely inside your browser.