JPG to Base64

Encode JPG images as Base64 data URIs โ€” instantly, in your browser.

Drag & drop your JPG file here, or click to choose. Everything runs in your browser — nothing is uploaded.

Base64 output

This free JPG to Base64 encoder converts your image into a data URI you can paste straight into HTML, CSS, JSON or an email template โ€” no hosting and no extra HTTP request. The bytes are read and encoded locally, so the file is never uploaded, and you can copy the result as a raw Base64 string, a data URI, a CSS background rule or a complete img tag.

Frequently Asked Questions

How do I convert a JPG to Base64?

Drop the file onto the box above and the encoded output appears immediately, along with a preview. Pick the output style you need โ€” plain Base64, a data URI, a CSS background-image rule or an HTML img tag โ€” then copy it or download it as a text file.

Are my files uploaded to a server?

No. The file is decoded and re-encoded directly in your browser using JavaScript and WebAssembly, and never leaves your device. That is what makes it safe for private photos, client work and anything confidential, and it is why the tool keeps working with your network disconnected once the page has loaded.

Why is the Base64 version bigger than my image?

Base64 represents every 3 bytes using 4 characters, so the encoded text is always about 33% larger than the original file, plus the data URI prefix. That trade is worth it for small assets like icons and logos, where you save a whole network round trip, but it is a poor deal for large photos.

When should I embed an image as a data URI?

For small, always-needed assets โ€” icons, logos, tiny background textures โ€” where removing an HTTP request matters more than the extra bytes. Avoid it for large images: they cannot be cached separately, they block your CSS or HTML from being parsed, and they bloat every page that includes them.

Does this work with transparency?

Yes. The original file bytes are encoded verbatim rather than being redrawn, so transparency, colour profile and any embedded metadata all survive exactly as they were.

Does this work on Windows, Mac, iPhone and Android?

Yes. It runs in any modern browser on Windows, Mac, Linux, iPhone and Android with nothing to install and no account needed. Chrome, Edge, Firefox and Safari are all supported.