Skip to main content
🔡

Image to Base64

Convert images to Base64 data URLs with HTML and CSS code snippets.

Advertisement

Upload Image

🖼️
Drop image here or click to upload
Advertisement

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.