Convert an image to Base64

Drop an image and get its Base64 data URL, the raw Base64 string, and ready-to-paste img and CSS snippets.

Image to Base64Processed on this device

Loading the tool…

  • Free, no sign-up
  • No upload
  • Full resolution kept

How it works

Three steps, under a minute

Drop an image and get its Base64 data URL, the raw Base64 string, and ready-to-paste img and CSS snippets. Encoding runs in your browser; the file is never sent anywhere.

  1. 1

    Add your files

    Drop the image.

  2. 2

    Process

    Copy the data URL, the raw Base64, an img tag or a CSS background rule.

  3. 3

    Download

    Paste it into your HTML, CSS, JSON or email template.

What you get

Everything you need, nothing uploaded

  • Any image the browser can read, including SVG and WebP.

  • Data URL, raw Base64, img tag and CSS snippets with one-click copy.

  • Shows the size increase so you can decide whether inlining is worth it.

  • No upload, no account.

When to use it

When to inline an image as Base64

Base64 makes a file about a third larger and prevents the browser caching it separately, so it only pays off for small images that would otherwise cost a request: icons, tiny logos, tracking-free email graphics and placeholders. For anything over roughly 10 to 20 KB, a normal image file served with caching is faster. Over 200 KB the page warns you.

In depth

Email and HTML signatures

Many email clients display inline Base64 images, but Gmail web blocks data URLs in incoming mail and some clients strip them from signatures. Test with your recipients’ clients before relying on it; hosted images are safer for marketing mail.

FAQ

Frequently asked questions

Can’t find an answer? The guides cover formats, sizes and privacy in depth.

Read the guides

Is my file uploaded?

No. Everything on this page runs in your browser and the file never leaves your device. The Network tab in the developer tools shows no upload while the tool works.

What is the difference between the data URL and the raw Base64?

The data URL starts with data:image/png;base64, and can be used directly in src or url(). The raw string is just the encoded bytes, for APIs and JSON fields that add their own prefix.

Can I convert Base64 back to an image?

Yes, with the Base64 to image tool.

Sources

Sources and further reading

Links checked 13 November 2026. Outside pages change, so check the date on them.

Related tools

More free tools

Done here? Make it look great.

Adjust, retouch and add effects in the full editor. Still 100% on your device.

Start editing