Convert Image To Base64 String

About This Tool

Convert your images to Base64 strings for embedding directly in HTML, CSS, or JavaScript. Perfect for reducing HTTP requests or when you need to include images in your code.


Supports JPG, PNG, GIF, WEBP, and SVG formats. Max file size: 5MB.

Drag & Drop to Upload

Supports JPG, PNG, GIF, WEBP, SVG

Usage Tips
  • HTML Usage: Use the <img src="data:image/png;base64,..."> format to embed images directly in your HTML
  • CSS Usage: Use background-image: url('data:image/png;base64,...') for CSS backgrounds
  • Performance: Base64 images are ~33% larger than binary files. Best for small images or when reducing HTTP requests is critical
  • Security: Base64 images are visible in your source code. Don't use for sensitive images