Image tools

Image to Base64 Converter: Data URI, HTML and CSS

Turn a JPG, PNG, WebP, GIF, SVG or ICO image into Base64 text, ready to paste as a data URI, an HTML <img> tag or a CSS background. Your image stays on your device and is never uploaded.

Your files stay on your device. Nothing is uploaded.

How to use the Image to Base64

  1. Choose or drop an image.
  2. Pick the format: data URI, plain Base64, HTML or CSS.
  3. Copy the result or download it as a text file.

Frequently asked questions

What is a Base64 image?
The image written out as plain text, so it can sit directly inside HTML, CSS, JSON or an email instead of being a separate file.
What's a data URI?
Base64 text with a short label in front, like data:image/png;base64, so web pages know what kind of file it is. Paste it anywhere an image address goes.
Does Base64 make images bigger?
Yes, about a third bigger. It's best for small icons and logos; for large photos, linking to the file loads faster.
Are my images uploaded?
No. Your image is converted on your device and never leaves it.