Base64 Image Encoder / Decoder

Convert images to Base64 Data URIs with ready-made HTML and CSS snippets, or decode a Data URI back to a downloadable image.

The Base64 Image Encoder / Decoder runs entirely in your browser. Images you drop and Data URIs you paste are processed on your device and are never uploaded to ArrayKit.

Open the Base64 Encoder / Decoder

About Base64 Image Encoder / Decoder

The Base64 Image Encoder turns any image into a Base64 Data URI you can paste straight into HTML or CSS. Drop a PNG, JPEG, WebP, SVG or GIF and it instantly shows the Data URI plus production-ready snippets — an <img> tag with editable alt text and a CSS background-image rule — each with one-click copy. It also reports the MIME type, file size, pixel dimensions and string length, so you know exactly what you are embedding. Switch to decode mode to paste a Data URI, preview the image, and download it with the correct file extension. It is built for front-end developers, email and template authors, and anyone inlining small icons to save a request. Everything runs locally in your browser, so your images stay on your device.

Features

How to use the Base64 Image Encoder / Decoder

  1. Keep the Image → Base64 tab selected and drop an image onto the drop zone
  2. Copy the Base64 Data URI, the HTML <img> tag, or the CSS background-image rule
  3. Optionally type alt text to bake it into the <img> snippet
  4. Switch to Base64 → Image, paste a Data URI, then preview and download the image

Example

Input

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB…

Output

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB…" alt="logo" />

A PNG becomes an inline <img> tag that loads with no extra network request.

Common errors & troubleshooting

Frequently asked questions

What is a Base64 image Data URI?
A Data URI embeds an image directly inside a string like data:image/png;base64,XXXX. The image bytes are Base64-encoded, so you can drop the whole picture into an HTML src or CSS url() with no separate file or request.
Which image formats can I encode?
Any image your browser can read — PNG, JPEG, WebP, GIF, SVG, BMP, AVIF and ICO all work. The decoder reads the MIME type from the Data URI and offers a matching download extension.
Should I inline images as Base64?
Inlining suits small, frequently reused assets like icons or email images where avoiding a request helps. For larger images it usually hurts, because Base64 adds about a third to the size and the data cannot be cached on its own.
Can I decode a Data URI back to an image file?
Yes. Switch to Base64 → Image, paste the data:image/…;base64, string, and the tool previews the picture and lets you download it with the correct file extension.
Are my images uploaded when I encode them?
No. The encoder reads the file with the browser's FileReader and builds the Data URI on your device. Nothing is sent to ArrayKit or any server.
Why is the Base64 string bigger than my image?
Base64 represents three bytes with four characters, so the encoded text is roughly 33% larger than the original binary, plus the short data:…;base64, prefix. That overhead is normal and expected.

Related tools

All ArrayKit tools