Skip to main content

Image to Base64

Convert images to Base64 data URLs with HTML and CSS code snippets. Runs in your browser — the file is never uploaded.

Upload Image

Drop image here or click to upload

How to Convert an Image to Base64

  1. Upload an image using the dropzone or file picker.
  2. The Base64 data URL, HTML img tag, and CSS snippet are generated instantly.
  3. Click Copy next to any snippet to copy it to your clipboard.
  4. Use Save .txt to download the data URL as a text file.

Base64 encoding increases file size by ~33%. It's best used for small images like icons to avoid extra HTTP requests.

Specifications

Accepts
Any image
Gives you
.txt download · copy to clipboard
Where it runs
Your browser — the file is never uploaded
Sign-up
None
Cost
Free, with no usage limits

Related guide

What Is Base64 Encoding? A Plain-English Guide Background reading on this page's topic