Skip to content

Image to Base64

Encode an image as Base64 or a ready-to-paste data URI.

Processed in your browser · No uploads

Drop your image here

or click to browse files

Supports: PNG, JPG, JPEG, JFIF, WebP, AVIF, HEIC, BMP, GIF, TIFF and ICO

Files stay on your device

About this tool

Base64 turns binary image data into plain text so it can be embedded directly in HTML, CSS, JSON or email templates. ImgFlow encodes the file exactly as it is — no re-compression — and detects the correct MIME type from the file contents.

Base64 makes data about 33% larger, so it is best for small images such as icons and placeholders.

How to use the Image to Base64

  1. 1Choose an image.
  2. 2Pick plain Base64 or a full data URI.
  3. 3Copy the result, or copy a ready-made HTML/CSS snippet.
  4. 4Download as a .txt file if you prefer.

Frequently asked questions

Base64 represents every 3 bytes with 4 text characters, so the output is about 33% larger than the file.