DataToolsLab
Image Tools

Image to Base64 Converter

Convert an image into a Base64-encoded data URI for embedding in HTML or CSS.

Loading tool…

What is Image → Base64?

Convert images to Base64 data URIs for embedding directly in HTML/CSS, or decode data URIs back to images.

How it works

We use the browser's FileReader API to encode images to Base64 and provide ready-to-paste HTML/CSS snippets.

  1. Upload. Upload an image to encode
  2. Copy. Copy the Base64 string, HTML, or CSS snippet.

Examples

Inline icon

Embed a small icon as a data URI to avoid an extra HTTP request.

Frequently asked questions

How much larger is Base64?

Base64 encoding increases file size by about 33%. It's best for small images only.

Online