toolo.dev

Image to Base64 Converter

Convert an image to Base64 online: drop or paste a PNG, JPG, GIF, WebP or SVG and copy a data URI, plain Base64, an HTML img tag, CSS or Markdown.

Drop an image here, paste one with Ctrl+V (Cmd+V on a Mac), or choose a file.

PNG, JPG, GIF, WebP, AVIF, SVG, ICO, BMP and more, up to 10 MB.

Your image stays in this browser tab. Nothing is uploaded: the Base64 is made in your browser.

About the Image to Base64

Drop, paste or choose a file to convert an image to Base64, and copy it as a data URI, plain Base64, an HTML <img> tag, a CSS background or Markdown. PNG, JPG, GIF, WebP, AVIF, SVG, ICO and BMP all work, and the image never leaves your browser.

Base64 turns the bytes of a file into plain text, so an image can sit inside HTML, CSS, JSON or an email body instead of being a separate file. That's handy for small icons, single-file reports and API payloads. The converter reads the real type from the file's first bytes, not from its name, so a JPEG saved as .png still gets the right image/jpeg data URI. It also shows the dimensions and how much bigger the Base64 is than the file.

  1. Drop an image onto the box, click Choose Image, or press Ctrl+V (Cmd+V on a Mac) to paste a screenshot from the clipboard. Files up to 10 MB work. Load Example uses toolo's own icon.
  2. Check the preview and the details under it: file name, type, dimensions and size. A note appears if the file's name doesn't match its real type.
  3. Pick an output: Data URI, Base64, HTML, CSS or Markdown. The HTML tag includes the image's width and height, and the alt text starts as the file name.
  4. Click Copy, or Download .txt for a long result. Very long output is cut short in the box to keep the page fast, but Copy and Download always give the full text.
  5. Choose Another loads a different image, and Clear starts over. You can also drop a new file onto the result.