Convert any image to a Base64 data URI right in your browser — no upload, no server, completely private.
🖼
Drag & drop an image here, or click to select a file
Supports PNG, JPG, GIF, SVG, WebP · Max recommended: 2 MBBase64 String (no prefix)
Data URI
CSS background-image
HTML <img> tag
How to use
- Drag and drop an image onto the zone above, or click to open the file picker.
- The tool reads the file locally using the FileReader API — nothing is sent to any server.
- Copy the output you need with the corresponding Copy button.
Output formats explained
| Format | When to use |
|---|---|
| Base64 string | APIs, databases, JSON payloads |
| Data URI | Direct src attribute value |
| CSS background-image | Paste straight into a stylesheet |
HTML <img> tag | Paste straight into HTML |
Why Base64-encode an image?
Embedding an image as a Base64 data URI lets you ship a self-contained HTML file or email template with no external requests. It is also useful for small icons in CSS, API payloads, and offline-capable web apps. The trade-off is a roughly 33% size increase and slightly slower initial parse — so keep embedded images small (under ~50 KB is a good rule of thumb).
Privacy
All conversion happens entirely in your browser. The image file never leaves your device.
Related tools: Base64 Encoder / Decoder · Image Resizer · Placeholder Image Generator
