Skip to content

Free online tool

Image to Base64

Encode an image as a data URL or raw Base64, or paste Base64 and download the image.

Choose the photo you want to turn into text

JPG, PNG, WebP, or GIF · up to 10 MB each

Decode back to an image

How to turn an image into Base64

  1. Choose a JPG, PNG, WebP, or GIF.
  2. Click Encode image.
  3. Choose Data URL or Raw Base64, then copy it. To go the other way, paste either form below and download the image.

The file is read in your browser and is not uploaded. A GIF stays in its original bytes, including animation.

Frequently asked questions

Is the image uploaded?

No. The data URL is created in your browser from the file you choose.

Where can I use the result?

Paste a data URL into an img src, a CSS url(), or an email template. Choose Raw Base64 when a field asks for the characters without the data URL prefix.

More questions on the FAQ page · Browse guides

Keep editing without leaving the site.