Back to All Tools

Image to Base64

Convert any image to a Base64 Data URL. Drop a file, browse, or paste from clipboard. Your images are processed entirely in your browser — nothing is uploaded.

Drop an image here

or click to browse — also supports Ctrl+V paste

PNG, JPG, GIF, WebP, SVG, BMP, ICO…

What is a Base64 Data URL?

A Base64 Data URL encodes binary file data (like an image) as an ASCII string, allowing it to be embedded directly in HTML or CSS without a separate HTTP request. The format is:

data:<mediatype>;base64,<base64-encoded-data>

For example, a small PNG becomes data:image/png;base64,iVBORw0KGgo…

When should you use Base64 images?

  • Small icons and UI assets — eliminates HTTP requests, improving performance for tiny images (under ~5 KB).
  • Email templates — many email clients block external images; embedding as Data URL ensures they always display.
  • CSS background images — embed sprites or icons directly in your stylesheet.
  • Offline / standalone HTML — self-contained HTML files with no external dependencies.
  • Canvas & WebGL — load images without CORS issues in JavaScript.

Base64 size overhead

Base64 encoding increases file size by approximately 33% compared to the original binary. For large images this can significantly increase page weight, so use Base64 embedding only for small assets where eliminating an HTTP request outweighs the size cost.

Supported formats

Any image format your browser can decode: PNG, JPEG, GIF, WebP, SVG, BMP, ICO, AVIF, and more.