Image to Base64

Encode an image as a Base64 data URI.

Turn an image into a Base64 data URI you can paste directly into HTML, CSS, or JSON — no hosting needed. Files are read entirely in your browser and never uploaded.

Drag & drop an image, or click to browse

PNG, JPG, SVG, GIF, WebP — up to 5MB

Browse files

Runs entirely in your browser — nothing is uploaded.

How to use the image to base64

  1. 1Choose an image file.
  2. 2Copy the data URI, or just the raw Base64.
  3. 3Paste it into your img src, CSS background, or code.

Frequently asked questions

Are my images uploaded?

No — the file is read locally in your browser and converted on your device.

When should I inline images as Base64?

For small icons and assets it avoids an extra request; for large images a normal URL is usually better.

Related tools