Image to Base64 Converter

Upload an image and instantly convert it to a Base64 string. Useful for embedding directly in HTML, CSS, or JSON.

or drag & drop image files here

How to Use the Image to Base64 Converter

This free online tool lets you convert images to Base64 encoding instantly. It supports PNG, JPG, WebP, GIF, and SVG formats. You can use the generated Base64 string in HTML, CSS, or JSON for embedding assets directly in your website or app.

  1. Upload an image by clicking the upload box or dragging and dropping files (you can upload multiple images at once).
  2. Select your output format: plain Base64 string, HTML <img> tag, or CSS background-image snippet. You can also choose to include or exclude the data:image/...;base64, prefix.
  3. Wrap output in JSON if needed, making it easy to store or send in a structured format.
  4. Copy or download the result using the buttons below each image. You can also export all images as a JSON array or download all outputs at once.
  5. Optional: Resize images before encoding to reduce Base64 size. Select Original, Medium (50%), or Small (25%) from the resize options.

Base64 encoding is useful for embedding image assets in HTML, CSS, JavaScript, or JSON files without needing external image hosting. This tool works entirely in your browser — no uploads or server processing required.