Encode / Decode

Base64 Image Encode / Decode

Drop an image file and get a Base64 data URI you can embed directly in HTML or CSS. Or paste a data URI and see the image preview instantly. Supports PNG, JPEG, WebP, and GIF. Everything runs locally — your images never get uploaded anywhere.

Base64 Image Encode/Decode — Convert images to Base64 data URIs and back

What it does

  • Converts PNG, JPEG, WebP, and GIF images to Base64 data URIs
  • Decodes Base64 data URIs back to viewable images with a preview
  • Handles large images without issue (processing is local)
  • Generates the full data: URI string ready to paste into HTML or CSS

Use cases

  • Embedding small images directly in HTML or CSS to reduce HTTP requests
  • Previewing a Base64-encoded image from an API response
  • Converting an image to a data URI for use in an email template
  • Inspecting Base64 image data from a database or config file

How it works

1

Drop an image file onto the input pane, or paste a Base64 data URI

2

If encoding: the tool generates a data: URI with the correct MIME type

3

If decoding: the tool shows a preview of the image

4

Copy the data URI or save the decoded image

Frequently asked questions

1Is there a file size limit?

There's no hard limit, but very large images produce very large data URIs. For anything over a few hundred KB, consider whether a data URI is the right approach — it increases the HTML/CSS file size and can't be cached separately.

2Does it preserve image quality?

Yes. Base64 encoding is lossless — the decoded image is byte-identical to the original. No compression or quality loss occurs during encoding or decoding.

3Can I use this for SVG files?

Yes, though for SVGs you're better off using the SVG Optimizer first to reduce file size, then encoding the optimized SVG as a data URI. The SVG to CSS tool does this in one step.

Related tools

Use Base64 Image Encode/Decode offline in Devinity

All 95 tools run locally on your Mac. No internet required, no data sent to servers.

Download Devinity →