Convert an image to Base64

Get a Base64 data URI, HTML img tag or CSS snippet for any image. Or paste Base64 to turn it back into an image.

Your files are processed on your device and not uploaded. Free, no sign-up. Privacy

In short

Embedding small images as Base64 saves an HTTP request and is handy for emails, single-file HTML pages and JSON APIs. For large photos it is usually better to link a file, since Base64 adds about a third to the size.

How to use the Image to Base64 online

  1. Drop an image.
  2. Choose data URI, raw Base64, HTML or CSS.
  3. Copy the text or download it.
  • Ready-made snippets. HTML and CSS forms, not just raw text.
  • Decode too. Paste Base64 to preview and save the image.
  • Size shown. Base64 is about 33% larger than the file; we show both.

FAQ

Image to Base64: common questions

How do I decode Base64 to an image?

Paste the Base64 or data URI into the decode box that appears after you open this tool, and download the image.

Are my photos uploaded to a server?

No. Every tool on Gods of Image runs inside your browser. Your photos are processed on your own phone or computer and never leave it, which makes it safe for ID cards, signatures, family photos and documents.

Is it free? Is there a limit on files or size?

It is completely free: no sign-up, no watermark, no daily limit and no file-size cap. Your own device does the work, so the only limit is its memory.

Often used next