Image to Base64

Turn an image into a Base64 data URL for HTML or CSS.

Also called: image to Base64 converter, data URI generator.

FreeNo sign-upRuns in your browser
DEVELOPER

Image to Base64

Turn an image into a Base64 data URL for HTML or CSS.

Runs locally in your browser
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.

Find a tool

Loading tools…

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

  1. Choose your filePNG, JPEG, WEBP, GIF, BMP. You can also drag it onto the box.
  2. Pick the optionsonly the Base64 text (the defaults suit most uses).
  3. Press Run toolThe result appears right under the button.
  4. 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.

More tools in Developer

See all Developer tools