Image to Base64 Converter

Convert any image to a Base64 string for HTML/CSS embedding.

Convert an image to Base64 in your browser

Choose a PNG, JPEG, GIF, WebP, AVIF, or BMP image up to 5 MiB. The file is read and encoded on this device; the image itself is not uploaded. Base64 is an encoding, not compression or encryption, and its payload is usually about one-third larger than the image.

Local conversion4 output formatsCopy or downloadNo image upload

PNG, JPEG, GIF, WebP, AVIF, or BMP · 5 MiB maximum · You can also paste an image

Select or drop an image to generate copy-ready Base64 output.

How to convert an image to Base64

  1. Choose or drop one supported image that is no larger than 5 MiB.
  2. Choose a Data URI, raw Base64, HTML image tag, or CSS background image.
  3. Copy the result or download it as a text file.

When should I use a Base64 image?

A data URI can be useful for a small icon or image that is embedded once in a document. Base64 makes the payload larger and removes the browser's separate image cache, so link to an image file for large assets or images reused across pages.

Frequently asked questions

What is an image data URI?

A data URI combines a media type, a Base64 marker, and encoded image bytes into one text value.

Does Base64 compress or encrypt my image?

No. Base64 represents bytes as text. It is neither compression nor encryption.

Which image types are supported?

PNG, JPEG, GIF, WebP, AVIF, and BMP files up to 5 MiB are accepted when their file signatures match a supported type. SVG and other content are not supported.

Is my image uploaded?

The selected file is read and encoded in this browser. This tool does not send the image data to a conversion server.

Related image tools

Files stay in the browser during conversion. The page may still load normal site resources.5 MiB per image.

Infinio Tools
© 2026 Infinio Labs