Skip to content
cubdomaincubdomain

Image to Base64 Encoder

Convert an image into a Base64 string or data URI for CSS, HTML or JSON.

Or fetch an image from a URL

How to use it

  1. 01

    Add an image

    Drop it in or choose a file.

  2. 02

    Pick the output

    Data URI, plain Base64, CSS background or an HTML img tag.

  3. 03

    Copy the result

    Paste it straight into your code.

Questions

When should I use Base64 images?

For small icons and images you want inside a CSS or HTML file. Large images are better as normal files.

Why is the Base64 bigger than my image?

Base64 adds about 33% to the size.

Is my image uploaded?

Not when you choose a file: it is converted in your browser and never leaves your device. If you use “From a URL”, our server fetches that image for you, and doesn’t keep it.