Free tools

Convert an image to Base64

Add an image and copy it as a data URL, bare Base64, a CSS background line or an HTML image tag. The panel shows how much longer the text is than the file.

Drop an image here

or browse your files

PNG, JPG, GIF, WebP, AVIF, SVG, ICO or BMP.

Add an image to get it as a data URL, bare Base64, a CSS background or an HTML image tag.

Nothing is uploaded. The text is made on your device.

  • No ads
  • No sign-up
  • No watermark
  • No daily limit
  • Nothing uploaded

Several steps, or a whole batch? Chain this with other tools in a Workflow and run them in one go.

The size it adds

Base64 writes every 3 bytes as 4 characters, so the text is about a third longer than the file, plus the few characters of the data: prefix. That’s a fair trade for a small icon inside a stylesheet or an email. For photos, link the file instead.

Which version to copy

Data URL is the whole thing, ready for an src or url(). Base64 only is the bare text, for JSON and APIs that ask for it. CSS and HTML give you a line to paste, with the width and height filled in for the image tag.

Your files stay with you

Everything happens on your own device. Nothing is uploaded, nothing is stored, and you don’t need an account. Close the tab and it’s gone.

More image tools

See all free tools