Image to Base64 encoder & decoder
Convert an image to a Base64 data URI — and back — entirely in your browser.
Runs 100% in your browserDecoded image appears here.
How to convert an image to Base64
- Pick a direction. Choose Encode (image → Base64) or Decode (Base64 → image).
- Add your input. Upload an image to encode, or paste a Base64 string / data URI to decode.
- 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
- 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.
- No. Encoding and decoding happen in your browser. Your image and Base64 text never leave your device.
- 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.
- Yes. Paste a Base64 string or full data URI into the decode tab to preview and download the original image.
- Base64 represents binary bytes using text characters, which inflates size by roughly one third. That is expected.