Image to Base64 Converter

Drag and drop your image here or click to browse

JPG, PNG, WebP, GIF, BMP, SVG, ICO — max 5MB

Image to Base64 Guide

Convert pictures to standard Base64 or data URI strings for HTML, CSS, and APIs. Output uses the image file's real bytes and correct MIME type so it works in browsers and other tools.

How it works
  1. Upload an image (JPG, PNG, WebP, GIF, BMP, SVG, ICO; max 5 MB).
  2. Choose whether to include the data URI prefix.
  3. Click Run to generate the Base64 string.
  4. Click Preview image to verify, then Copy to Clipboard for HTML, CSS, or JSON.
Key features/options
  • Data URI toggleOutput raw Base64 or a full data:image/… URI.
  • Many formatsJPG, PNG, WebP, GIF, BMP, SVG, and ICO supported.
  • One-click copyCopy encoded text to the clipboard.
  • Run + copy workflowSame controls as other BitBotBoo tools.
Common uses
  • Embed small icons or logos inline in HTML or CSS.
  • Send image payloads in JSON APIs during development.
  • Test email templates with inline images.
  • Avoid extra HTTP requests for tiny assets.
Privacy & features
  • Images are processed for encoding and not stored after the result is returned.
  • Free with no account required.
  • Copy-ready output for developers.
FAQ

Is my image data secure?

Your image is used only to produce the Base64 string; we do not keep a copy on disk after the request completes.

Data URI or raw Base64?

Use the data URI option for <img src="…"> and CSS url(). Turn it off when an API expects only the Base64 payload without the data:image/…;base64, prefix.

I pasted the code in a new tab and saw an error. Why?

Browsers do not render HTML from the address bar, and very long data URIs often fail there too. Use Preview image on the tool page, or save a small test.html file with a full document and your <img src="…"> inside the <body>.

What formats are supported?

JPG, PNG, GIF, WebP, BMP, TIFF, SVG, and ICO up to 5 MB.

Why use Base64 images?

They embed directly in HTML or CSS, reducing separate file requests for small assets.