Image to Base64
Drag and drop files here or click to select files
Image to Base64 Online Tool

This tool supports converting various image formats to Base64 encoding

It allows you to use images directly in webpages without the need to upload separate image files.

Supported image formats include: .pjp, .jfif, .heic, .tpg, .svgz, .jxl, .jpeg, .ico, .tiff, .avif, .svg, .jpg, .tif, .gif, .png, .xbm, .pjpeg, .bmp, .webp.

Usage Example

  • Use in CSS
  • .box{
      background-image: url("data:image/jpg;base64,/9j/4QMZR...");
    }
  • Use in HTML
  • <img src="data:image/jpg;base64,/9j/4QMZR..." />

Note: The file size after Base64 encoding is generally about 30% larger than the source file.

Browsers that support Base64 (DataURI)

  • Chrome 4+
  • Android Chrome 57+
  • Firefox 2+
  • Android Firefox 52+
  • Safari 3.1+
  • IOS Safari 3.2+
  • Opera 9+
  • IE 8+
  • Mobile IE10+
  • Edge12+
  • Android UC11+
  • QQ Browser1.2+