Skip to main content

Image to Base64 Converter

Runs locally

Convert images to Data URIs, CSS/HTML snippets and decode Base64 back to downloadable images.

What is Image to Base64 Converter?

Convert PNG, JPEG, WebP, GIF, or SVG images into Base64 Data URIs with ready-to-copy CSS `background-image` and HTML `<img>` snippets, or decode a Base64 Data URI back into a previewable, downloadable image.

How to use Image to Base64 Converter

  1. Step 1

    Drop an image file or switch to Base64 → Image mode and paste a Data URI.

  2. Step 2

    Copy the Data URI, raw Base64, CSS snippet, or HTML tag.

  3. Step 3

    Check byte inflation vs raw file size.

Features

  • Bidirectional Image ↔ Base64 Data URI
  • Copy as Data URI, CSS `url()`, HTML `<img>`, or Markdown
  • Displays original bytes vs Base64 length
  • 100% local FileReader processing

Example

Input

icon.svg (240 B)

Output

data:image/svg+xml;base64,PHN2Zy...

Produces an inline Data URI suitable for critical CSS or email templates.

Frequently asked questions

How much larger is Base64 than the original image?

Base64 encoding adds ~33% byte overhead; prefer it only for small icons or inline email assets.

Can I decode a Base64 string back to an image?

Yes, paste a `data:image/...` or raw Base64 image string in Decode mode.

Are images uploaded to a server?

No, everything runs locally in your browser.

Can I compress the image first?

Yes, use the Image Compressor tool before encoding.