Base64 Image Encoder

Convert an image to a Base64 data URI for CSS or HTML embedding — and turn a pasted data URI back into a downloadable image, entirely in your browser.

Privacy secured — processed and purged

Paste a data URI to turn it back into an image

Everything runs in your browser — your file is never uploaded.

How to encode an image as Base64

  1. 1Drop an image — it is read locally, never uploaded.
  2. 2Copy the full data URI, or the ready-made CSS and HTML snippets.
  3. 3Paste a data URI in the lower box to turn it back into a downloadable image.

When a data URI is the right tool

A data URI embeds the whole file inside the text — nothing is fetched from a server, which is why it is used for email signatures, single-file HTML demos, and small icons in CSS. The trade-off is size: Base64 encoding makes a file about 33% larger, and it cannot be cached separately from the document that carries it. For anything above roughly 10 KB, a normal image file is the better choice; for a small logo it removes a request entirely. Everything here runs in your browser, so even a private image never leaves your device.

FAQ

Why is the Base64 string bigger than the file?

Base64 represents every 3 bytes as 4 ASCII characters, so the text is about a third larger than the binary it encodes. That is the cost of embedding data in a text document.

Which image types can be decoded back?

PNG, JPEG, WebP, GIF, SVG, AVIF, and BMP data URIs are recognised and can be downloaded as their original type.

Advertisement space — reserved

Related tools