Skip to content
snip tools

Image to Base64 encoder & decoder

Convert an image to a Base64 data URI — and back — entirely in your browser.

Runs 100% in your browser

How to convert an image to Base64

  1. Pick a direction. Choose Encode (image → Base64) or Decode (Base64 → image).
  2. Add your input. Upload an image to encode, or paste a Base64 string / data URI to decode.
  3. Copy or download. Copy the Base64 (or the ready-made HTML/CSS snippet), or download the decoded image.

About Base64 images

Encoding an image as Base64 turns it into a plain-text string you can paste straight into HTML, CSS or a JSON payload — handy for tiny icons, inline email graphics, or bundling an asset without a separate file. The trade-off is size: Base64 adds about a third to the byte count and can't be cached separately, so keep it for small images. This tool encodes and decodes locally in your browser, so nothing is uploaded. For plain text and other data, see the general Base64 encoder / decoder.

Frequently asked questions

What is a Base64 image / data URI?
A data URI encodes an image directly as text (e.g. data:image/png;base64,iVBOR…). You can embed it in HTML, CSS or JSON so the image loads with no separate file or network request.
Is my image uploaded to encode it?
No. Encoding and decoding happen in your browser. Your image and Base64 text never leave your device.
When should I use a Base64 image?
For tiny icons, inline email images or avoiding an extra request. Base64 is about 33% larger than the binary file, so it is a poor choice for large images — link those normally instead.
Can I decode Base64 back into an image?
Yes. Paste a Base64 string or full data URI into the decode tab to preview and download the original image.
Why is the encoded string so long?
Base64 represents binary bytes using text characters, which inflates size by roughly one third. That is expected.