Free · runs in your browser · no upload · no quota

Image to Base64 Converter

Drop an image and get its Base64 as a ready-to-paste data URI, an HTML <img> tag or a CSS background. Works with PNG, JPG, SVG, WebP, GIF, ICO and any other file.

Drop an image here or click to choose one

How to Convert Image to Base64

  1. Choose the image
    Drop it on the box or click Open file. Any image type works, and any other file too.
  2. Pick the output
    Data URI for most uses, HTML <img> or CSS background to paste straight into your code, or plain Base64 for APIs.
  3. Copy the result
    Click Copy and paste it where you need it, or download it as a text file.

Example

Image
logo.png (1×1 px)
Base64
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==

Frequently Asked Questions

More browser tools

Working with files rather than text? Our file converters handle PNG to WebP, JPG to WebP, SVG to PNG and 400+ other formats.