Skip to content

Image to Base64 Converter

Turn an image into a Base64 data URI with ready and CSS snippets, or paste Base64 to preview and download the image.

About Image to Base64 Converter

This image to Base64 converter online turns a PNG, JPG, SVG or other image into a Base64 string and a ready data URI. Copy the raw Base64, the full data URI, an HTML img tag or a CSS background snippet, whichever your code needs. It is handy for embedding small icons in HTML, CSS, emails or JSON.

It also works the other way as a Base64 decoder: paste a Base64 string or data URI, preview the image and download it as a file. Everything happens in your browser, so your images and data are never uploaded, and the tool is free with no sign-up.

How to use Image to Base64 Converter

  1. Drop an image (or try the sample) on the Image → Base64 tab.
  2. Copy the data URI, raw Base64, <img> tag or CSS snippet.
  3. To decode, switch tabs and paste a Base64 string or data URI.
  4. Preview it and download the image file.

Frequently asked questions

Why is Base64 bigger than the file?

Base64 encodes every 3 bytes as 4 text characters, so it is about 33% larger. Use it for small icons and email templates, not large photos.

Can I paste Base64 without the data: prefix?

Yes. The decoder detects PNG, JPG, GIF, WebP and SVG from the first bytes.

How do I convert an image to Base64?

Drop the image on the Image to Base64 tab. The data URI and raw Base64 appear instantly, ready to copy.

How do I decode Base64 back to an image?

Switch to the Base64 to Image tab, paste the string or data URI, check the preview and click download to save the image file.

People also search for

image to base64 converter online · image to base64 online free · image to base64 converter · image to base64 converter free · image to base64 converter online free · image to base64 online · image to base64 converter html · image to base64 decode online · base64 decode · data uri · image to base64 · image to base64 string converter online

Related tools