Tool Fu
$ toolfu run image-to-base64

Image to Base64 Converter — Online Free

Convert images to Base64 online for free. Drop a PNG, JPG, or any image and get the Base64 string or data URI instantly — no upload to any server.

all processing runs in your browser
image-to-base64
input > drop image

$ drop an image here or click to browse

PNG, JPG, GIF, WebP, SVG, BMP

or paste from clipboard (⌘V / Ctrl+V)

Convert Images to Base64 Online — Free Encoder

Convert any image file to a Base64-encoded string directly in your browser. Drop a PNG, JPG, GIF, WebP, or SVG file and instantly get the raw Base64 output and a ready-to-use data URI. See file size statistics and copy either format to your clipboard.

What is Base64 image encoding?

Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. When applied to images, it lets you embed image data directly in HTML, CSS, or JSON without needing a separate file. The data URI format (data:image/png;base64,...) can be used directly in img tags and CSS background-image properties.

Common use cases

  • Embedding small icons in CSS to eliminate HTTP requests
  • Including images in JSON API responses
  • Creating self-contained HTML email templates
  • Storing image thumbnails in databases
$ cat FAQ.md
What image formats are supported?
This tool supports all common image formats including PNG, JPG/JPEG, GIF, WebP, SVG, and BMP. Any format your browser can read will work.
Is my image uploaded to a server?
No. The conversion happens entirely in your browser using the FileReader API. Your image never leaves your device.
Why is the Base64 string larger than the original file?
Base64 encoding increases size by approximately 33%. This is because Base64 represents binary data using 64 ASCII characters, which is less efficient than raw binary. The tradeoff is that Base64 strings can be safely embedded in text-based formats like HTML, CSS, and JSON.
When should I use Base64-encoded images?
Base64 images are useful for embedding small images directly in HTML or CSS to reduce HTTP requests, for including images in JSON APIs, for email templates, and for data URIs. For large images, it's generally better to use regular file references.