Image to Base64
Turn any image into a Base64 string or a ready-to-paste Data URL for HTML, CSS and code — upload the file, copy the output, and keep everything private in your browser.
🖼️
Drag & drop an image here
or click to browse from your device (PNG, JPG, WebP, GIF, SVG)
Preview
File Information
| File name | — |
|---|---|
| File size | — |
| Dimensions | — |
| Format / MIME type | — |
| Base64 output size | — |
Privacy note: Your files never leave your browser — all work happens on your phone/computer, nothing is uploaded.
How to use
- Click the box above or drag and drop an image into it.
- See the preview and file information — name, size, dimensions and format.
- Copy the full Data URL for use in HTML or CSS, or copy just the raw Base64 string.
- Use Download .txt to save the Base64 string as a text file.
Tips
- Use Data URLs for tiny icons — not for photos, as they bloat page size.
- Copy the raw Base64 string for APIs and code.
- Large images produce very long strings.
- Prefer normal file URLs for anything bigger than an icon.