Image to Base64
Turn an image into a data URL you can paste straight into CSS or HTML. The conversion is lossless — every pixel, sample or byte in the source is preserved.
Drop your files here
JPG, PNG, WebP, AVIF and 4 more formats · up to 20.0 MB each
or paste files from your clipboard
Ready when you are
Turn an image into a data URL you can paste straight into CSS or HTML. Everything happens in this tab; nothing is sent anywhere.
How to use it
- 1
Add your files
Image to Base64 works with JPG, PNG, WebP, AVIF, GIF, SVG, ICO and BMP. Drop them in, browse for them, or paste from your clipboard.
- 2
Choose your options
Tune the output settings — or leave the defaults, which are sensible.
- 3
Run it and download
Press the button and save the result. Everything happens on your device, and nothing is uploaded.
About these formats
Accepts
JPEG Image
The universal lossy photo format.
- Extensions
- .jpg, .jpeg, .jpe, .jfif
- MIME type
- image/jpeg
- Best for
- Photographs · Email and messaging · Maximum compatibility
- Compatibility
- Opens everywhere — every browser, OS and device.
Accepts
Portable Network Graphics
Lossless image format with full alpha transparency.
- Extensions
- .png
- MIME type
- image/png
- Best for
- Transparency · Graphics and logos · Screenshots
- Compatibility
- Universally supported.
Base64 makes files about 33% larger. It is useful for tiny icons, not for photographs.
Good to know