Image to Base64

Convert any image into a base64 data URL for embedding.

or drag & drop an image here (max 50MB)

Converted 100% in your browser, nothing is uploaded.

About this tool

JoliTools Image to Base64 converts any image into a base64-encoded data URL you can paste directly into HTML or CSS. Upload a file and the tool shows the complete data string, starting with data:image/...;base64,, ready for an <img> tag or a stylesheet, plus honest size stats comparing the original file to the encoded text.

Developers use base64 images to inline small graphics like icons and logos, eliminating extra HTTP requests. The trade-off is size: encoding adds roughly 33% overhead, so base64 is best for small images. Converting in the browser means the file never leaves your device, important when the image is private or unreleased work.

How to use the image to base64

  1. 1Upload an image (JPG, PNG, WebP, GIF or SVG, up to 50MB).
  2. 2The tool converts it to a base64 data URL instantly.
  3. 3Check the size info: base64 text is always about 33% larger than the file.
  4. 4Click Copy full base64 to copy the entire string.
  5. 5Or click Download as .txt to save the string to a file.

Good to know

The output preview shows the first characters of the string so the page stays fast even with huge files; the copy button always grabs the full value. You can also download the string as a .txt file to store or share it easily.

Frequently asked questions

Base64 encoding stores every 3 bytes of image data as 4 text characters, so the output is always about 33% larger than the original file. That's how the format works, it's not an error.

More free tools you might find useful.

Part of Image Tools on JoliTools, free tools, no sign-up.