Image to Base64

Convert any image (JPG, PNG, GIF, SVG, WebP) to Base64 or data URI. Paste directly in CSS or HTML.

Free Runs in your browser Converters
🖼️

Drop an image here or click to upload

Supports JPG, PNG, GIF, SVG, WebP

How to use

  1. 1 Click or drag an image file into the upload area.
  2. 2 The tool encodes it as a Base64 data URI instantly in your browser.
  3. 3 Copy the full data URI (for use in CSS or HTML src attributes) or just the Base64 string.
  4. 4 Useful for embedding small images directly in CSS, HTML, or JSON without a separate HTTP request.

Key features

  • Encodes any image to Base64 in your browser — no upload to any server
  • Outputs full data URI (for CSS background-image) and plain Base64 string
  • Shows the encoded string length and estimated size
  • Supports PNG, JPEG, GIF, WebP, and SVG