Image to Base64 — Encode an Image as a Data URI
Encode an image as a Base64 data URI, right in your browser. Drop an image and copy either the full data URI (ready for CSS or HTML) or the raw Base64. Your image is never uploaded.
How to use it
- 1Choose an image
Drop an image onto the drop zone, or click to select one.
- 2Copy the encoding
Copy the full data URI, or just the raw Base64 string.
- 3Paste it in
Use it in a CSS background, an <img> src, or anywhere a data URI is accepted.
Inline images without a request
A data URI embeds the image directly in your CSS or HTML, so the browser doesn’t make a separate network request for it. That’s handy for tiny icons, email templates, or bundling an image into a single file.
Frequently asked questions
Is my image uploaded to a server?
No. Encoding happens entirely in your browser — your image never leaves your device.
What is a data URI?
A string that encodes the whole image inline (data:image/png;base64,…), so it can be embedded directly in HTML or CSS.
Why is the Base64 larger than the file?
Base64 encoding adds about 33% overhead, so data URIs are best for small images.
Related tools
Base64 to Image
Paste a Base64 string or data URI and preview the image, then download it — all in your browser. No upload, no sign-up; nothing leaves your device.
Base64 Encoder
Encode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support, copy with one click — nothing is sent to a server.
Color Picker
Pick any color from an image and get its HEX, RGB and HSL codes. Click anywhere on your photo — runs in your browser, no upload, files never leave your device.