Image to Base64
Convert an image to a Base64 data-URI string, copy to clipboard with one click — JPG, PNG and WebP, in your browser.
Quick answer
Turn a JPG, PNG or WebP image into a Base64 data-URI string with one-click copy — perfect for inlining in HTML, CSS or code. Everything runs in your browser, so nothing is ever uploaded.
Drag & drop an image here
or click to browse — JPG, PNG or WebP up to 20MB
Image files only — up to 20MB each
How to convert an image to Base64
Upload an image
Drop in a JPG, PNG or WebP image — up to 20MB.
Get the string
The Base64 string appears instantly. Click Copy to grab the full data-URI.
Paste into your code
Paste the string into an HTML src, CSS background-image, or any code that accepts data URIs.
Key features
Instant result
The Base64 string is generated the moment your image loads.
One-click copy
Copy the full data-URI to your clipboard with a single click.
Format preserved
Works with JPG, PNG and WebP and outputs the matching MIME type.
No uploads
All encoding happens in your browser — your image never leaves your device.
Supported formats
- JPG / JPEG (.jpg, .jpeg)
- PNG (.png)
- WebP (.webp)
Privacy and security
Limitations
- Base64 encoding adds ~37% size overhead — best for small images. Large images produce very long strings.
- Max file size 20MB.
- Works on JPG, PNG and WebP only.
Related Tools
All toolsResize Image
Resize JPG, PNG or WebP images to exact dimensions with aspect-ratio lock and handy presets.
Compress Image
Shrink JPG, PNG or WebP files with a quality slider and see the before/after size instantly.
Convert Image
Convert images between JPG, PNG and WebP right in your browser — no uploads, no sign-up.
