Image to Base64

Convert any image to Base64 string or Data URI online. Free, instant, client-side — your images never leave your browser.

Drag & drop an image or click to select
Format
Dimensions
FileSize
Image Preview
preview
Base64 Output
Data URI (with prefix)
No image selected

How It Works

  1. Upload an image by dragging it onto the page or selecting it from your device.
  2. The tool instantly processes the file directly in your browser with no data sent anywhere.
  3. Choose your preferred output format — a plain Base64 string or a full Data URI.
  4. Copy the result with one click and use it in your code, HTML, or CSS project.

Example

Input: logo.png (small 1x1 pixel red PNG image)
Result: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwADhQGAWjR9awAAAABJRU5ErkJggg==

FAQ

Yes, completely safe. All processing happens locally in your browser. Your images are never sent to any server and are not stored anywhere — everything stays on your device.

The tool supports all common image formats including PNG, JPEG, GIF, WebP, SVG, BMP, and more.

A Base64 string contains only the raw encoded data. A Data URI includes a prefix like 'data:image/png;base64,' and can be used directly as the value of an src attribute in HTML or CSS.

There is no strict limit, but very large files may slow down your browser since Base64 encoding increases the data size by approximately 33%.

Embedding images directly into HTML, CSS, or JSON files, sending images through APIs without file uploads, reducing HTTP requests in web apps, and storing images in databases as text.