Convert an Image to Base64, Free

Turn an image into a base64 data URL, ready to paste into CSS, HTML or Markdown. Runs in your browser, so the image is never uploaded.

Free, no sign-up, runs in your browser

Your image is read on your own device and never uploaded.

100% private. The image is read and encoded in your browser, never uploaded.

Quick answer

BatchSet turns an image into base64 free and entirely in the browser, with no upload: the file is read on the device with FileReader. The result is offered as a data URL, a CSS background rule, an HTML img tag, Markdown or bare base64, with one click to copy. Base64 writes 3 bytes as 4 characters, so the text is about a third bigger than the file, which the tool shows; inlining is worth it for icons and email images, not for large pictures. JPG, PNG, WebP, GIF, BMP, AVIF and SVG all work.

How to use the Image to Base64

Three quick steps — free, private, right in your browser.

1

Add your image

Drop a JPG, PNG, WebP, GIF, BMP, AVIF or SVG file.

2

Pick how you will paste it

A plain data URL, a CSS background rule, an HTML <img> tag, Markdown, or the base64 on its own.

3

Copy

One click copies the text. The image never leaves your device.

Features

  • Data URL, CSS, HTML, Markdown or bare base64
  • One click to copy
  • Shows how much bigger the text is
  • Works with SVG too
  • Runs in your browser, nothing uploaded
  • Free, no sign-up

Use Cases

  • Inline a small icon in CSS
  • Embed an image in an HTML email
  • Put a logo in a Markdown file
  • Avoid one more network request

Frequently asked questions

Why is the base64 bigger than my image?+

Base64 writes every 3 bytes as 4 characters, so the text is about a third larger than the file, before any quoting. The tool shows both numbers so you can see the trade.

When is inlining an image worth it?+

For small things: an icon, a logo, a 1px background, or an image in an HTML email where a linked file would be blocked. It saves a request. For anything large it bloats the HTML or CSS, which has to be downloaded before the page can paint, and it cannot be cached on its own.

Is my image uploaded?+

No. The browser reads the file and encodes it on your device. Nothing is sent to a server, which is the point when the image is a private document or a screenshot.

Does it work with SVG?+

Yes. An SVG is text, so it encodes like anything else, and the data URL works in CSS and HTML the same way.

Is there a size limit?+

The same browser limit as the rest of the site. Very large images make very large strings, and some editors and email clients choke on them long before that.

Related free tools

Want more power?

Unlock bulk Excel jobs, watermarking, file backup and more. Free to start.

Start for Free — No Card Required