Image to Base64 converter

Drop an image and copy it as a data URL, CSS or HTML – or turn Base64 back into an image.

Image → Base64

Base64 → image

100% private: everything is processed locally in your browser. Your data never leaves your device.

How to use

  1. Drag an image into the box or select one.
  2. Choose the output: data URL, raw Base64, CSS, HTML or Markdown.
  3. Copy the code. To decode, paste a Base64 string below.

When are Base64 images useful?

A data URL embeds an image directly in HTML, CSS, JSON or email – no separate file needed. This is mainly worthwhile for small icons and graphics.

Base64 makes files about 33% larger and can't be cached separately by the browser, so regular image files are usually better for large photos.

Frequently asked questions

Is my image uploaded?

No. The conversion runs entirely in your browser.

Why is the Base64 code larger than the image?

Base64 represents 3 bytes with 4 characters, so the data grows by about a third.

Can I decode Base64 without the “data:” prefix?

Yes. The tool detects PNG, JPG, GIF, WebP, SVG, BMP and ICO automatically from the content.