Skip to contentSellstamp

Image to Base64

Encode an image as Base64 in your browser and copy it as a data URL, raw Base64, a CSS background or an HTML img tag.

Encoded in this tab, never uploaded. Best for small images: base64 is a third larger than the file.

Your file stays on your device

Your browser opens and processes the file itself. It is never uploaded, to Sellstamp or anyone else, and nothing is kept after you close the page.

Selling images?

Photos, templates, presets or artwork: Sellstamp gives them a storefront and delivers the files automatically after payment. Open a free store

How to use it

  1. Choose an image.
  2. Pick how to copy it: data URL, Base64 only, CSS or HTML.
  3. Copy it, or download it as a text file.

Your images are not uploaded

Your browser opens the image, does the work in this tab, and saves the result back to your device. Nothing is sent to Sellstamp or anyone else, so there is no upload to wait for and no copy on a server afterwards.

When Base64 makes sense

A data URL puts the image inside your HTML, CSS or JSON, which saves a request for tiny images such as icons. Base64 is about a third larger than the file, and an embedded image cannot be cached separately, so for anything over a few kilobytes a normal image file is usually better.

Questions

How do I use a Base64 image in HTML?

Copy the HTML option: an img tag whose src is the data URL. Paste it into your page.

Why is the Base64 bigger than my file?

Base64 uses four characters for every three bytes, so it is about 33% larger.

Is there a size limit?

No fixed limit, but very large data URLs slow pages and editors down. Use them for small images.

Can I turn Base64 back into an image?

Yes, with the Base64 to image tool.