Image to Base64
Turn an image into a Base64 data URL for HTML or CSS.
Also called: image to Base64 converter, data URI generator.
DEVELOPER
Runs locally in your browserImage to Base64
Turn an image into a Base64 data URL for HTML or CSS.
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.
Watch: how to use the Image to Base64 (12 seconds)
Recorded on a phone, steps written on screen, no sound.
About the Image to Base64
Turn a picture into a Base64 data URL you can paste straight into HTML (<img src=…>) or CSS (background-image), so small icons load without an extra file. Choose “only the Base64 text” when an API asks for the raw string.
Keep it for small images: Base64 makes files about one third bigger. The image is read in your browser.
How to use the Image to Base64
- Choose your filePNG, JPEG, WEBP, GIF, BMP. You can also drag it onto the box.
- Pick the optionsonly the Base64 text (the defaults suit most uses).
- Press Run toolThe result appears right under the button.
- Download the resultUse the Download button to save the new file.
This tool works inside your browser: what you enter stays on your device.
Good to know
- What you need
- One file: PNG, JPEG, WEBP, GIF, BMP
- Where it runs
- In your browser, on your device.
- Limits
- Free plan: up to 40 files at a time and 200 MB per file (500 MB for video and audio). Pro removes these limits. Big files take longer on older phones.
- Cost
- Free, no sign-up.
Questions
Why is the Base64 bigger than my file?
Base64 uses 4 characters for every 3 bytes, about 33% more.
Which images work?
PNG, JPG, WebP, GIF and BMP.