Image to Base64

Encode any image to a Base64 data URI for embedding inline in HTML, CSS, or Markdown.

100% in your browser · No uploads · Free limit 50 MB

Click to upload or drag and drop an image

JPG, PNG, WEBP, GIF, BMP · max 50 MB/file

What this does

Image to Base64 encodes any image as a Base64 data URI you can paste inline into HTML, CSS, or Markdown. Removes the need for a separate image file.

When to use it

  • Embedding a small icon directly in an HTML file or email
  • Inlining a background image in CSS to reduce HTTP requests
  • Pasting an image into Markdown that doesn't support file uploads
  • Sharing an image as text in a chat or terminal

Frequently asked

Should I inline every image?

No. Base64 inlining is ~33% larger than the binary file. Use it only for small images (under ~10 KB) where saving an HTTP request matters.

Will it work in email?

Most modern email clients support data URIs, but some (notably Outlook for Windows) block them. Test before relying on inline images.