Utility

Convert an image to Base64

Your files are processed on your device. We never upload them.

Format

How to convert an image to Base64

  1. 01A ▸Choose an image, or drop it on the page.
  2. 02A ▸Pick the format you need, such as a data URI or CSS.
  3. 03A ▸Copy the text, or download it as a .txt file.

Questions

What is a data URI?

A whole image written as text, starting with data:image/png;base64. You can put it straight into HTML, CSS, or JSON instead of linking a separate file.

Why is the text bigger than my file?

Base64 uses 4 characters for every 3 bytes, so the text is about a third larger than the image. That's why it suits small icons more than photos.

Which formats work?

PNG, JPG, WebP, GIF, SVG, AVIF, BMP, and ICO. The type in the data URI comes from the file's contents, not its name.

Are my images uploaded?

No. Your files are processed on your device. We never upload them.

Is there a size limit?

No fixed limit. Very long text is shown shortened on the page, but Copy and Download always give all of it.