Image to Base64 converter

Drop or paste images, copy a data URI, img tag or CSS snippet. Nothing is uploaded.

Free to use, no sign-up.

How it works

  1. Drop one or more images, paste one from your clipboard, or choose files. SVG files are supported too.
  2. Read the size advice, then pick an output: data URI, raw Base64, an HTML img tag, a CSS background-image declaration or Markdown.
  3. Copy the snippet. The image is read and encoded in your browser and never uploaded.

Questions

Are my images uploaded?

No. The file is read by your browser and encoded locally. The tool has no network access, so the image never leaves your device.

Is there a file size limit?

The tool sets no limit; the only constraint is your device's memory. Large images produce very long strings, though, and the tool warns you above 32 KB and 1 MB because inlining big files usually hurts page performance.

How much bigger does Base64 make an image?

About 33% bigger, because every 3 bytes become 4 text characters. The tool shows the exact encoded size for each image.

When should I inline an image as Base64?

Inlining suits very small images, such as icons and tiny logos, in places where an extra HTTP request is awkward: HTML emails, single-file pages, CSS. For larger images a normal file is better because the browser can cache it separately.

What is the difference between a data URI and raw Base64?

Raw Base64 is just the encoded text. A data URI adds the prefix data:image/png;base64, so browsers know the type and can use it directly in an img src or a CSS url().

Can I convert SVG to a smaller data URI?

Yes. For SVG you can minify the markup first and switch to a URL-encoded data URI, which is usually smaller than Base64 and stays readable.

Can I paste a screenshot straight in?

Yes. Copy an image to your clipboard and press Ctrl+V (Cmd+V on Mac) while the tool is focused. Some browsers restrict paste inside embedded frames; if that happens, save the image and drop it instead.

Free tool by Huntsville Software. It runs in your browser; your files and text are not uploaded.