Runs in your browser · nothing uploaded

Image to Base64

Get the data URI plus ready-to-paste CSS and HTML — and decode Base64 strings back into files.

Drop an image here, or click to choose

Small images only — under ~50 KB is the sensible zone

Decode Base64 back to an image

How to use

  1. Drop a small image and wait for the data URI, raw Base64, CSS and HTML fields.
  2. Copy the form your destination expects, or paste a Base64 value into the decoder below.
  3. Test the pasted result in its destination before removing the original file.

Best results

Use a normal image file for photos and anything that benefits from browser caching. Base64 is most useful for a small, self-contained asset; it adds about 33% to the binary size and is not encryption.

When Base64 is the right call

Embedding an image as a data URI removes one HTTP request — worthwhile for tiny, render-blocking assets: icons in CSS, email signatures, single-file HTML documents. The encoded text is about 33% bigger than the binary and cannot be cached separately, so past a few tens of kilobytes a normal file wins.

Base64 is not encryption

It is a plain re-encoding that anyone can reverse (that is literally what the decoder below does). Never treat it as a way to hide image contents. And if the real goal is a lighter page, embedding rarely beats simply making the image smaller.

Frequently asked questions

When should I embed an image as Base64?
For tiny assets where saving one HTTP request matters: icons inside CSS, email signatures, single-file HTML pages. Past a few tens of kilobytes, a normal cached image file is faster.
Why is the Base64 version bigger than my file?
Base64 represents 3 bytes of binary as 4 characters of text, so output is ~33% larger by design. That is the price of being able to paste binary data into text formats like HTML, CSS and JSON.
Is Base64 a way to protect or encrypt an image?
No. It is a reversible re-encoding, not encryption — the decoder on this very page turns it straight back into the image. Never use it to hide sensitive content.