ICO to PNG Extractor

Extract individual PNG frames from a multi-resolution .ico file.

Ad placeholder (leaderboard)

A .ico file is the Windows icon format. Unlike a PNG, it is a container that bundles several images at different sizes and colour depths so the operating system can show a crisp icon whether it is rendered tiny in a list or large on the desktop. This free tool unpacks an ICO and gives you each frame as a downloadable PNG, all in your browser.

How it works

The ICO begins with a 6-byte directory header (ICONDIR) recording the image count, followed by one 16-byte ICONDIRENTRY per frame that stores the width, height, colour depth, and the byte offset of the image data. For each entry, the tool inspects the data:

  • If it starts with the 8-byte PNG signature, the bytes are already a PNG and are extracted directly.
  • Otherwise the data is a DIB (device-independent bitmap): a BITMAPINFOHEADER, an optional colour palette, bottom-up pixel rows, and a 1-bit AND transparency mask. The decoder reads 1, 4, 8, 24, or 32-bit pixels, applies the AND mask for transparency, flips the rows right-side up, and paints them onto a Canvas, which is exported as PNG.

Notes and tips

A width or height byte of 0 in the directory means 256 pixels — a quirk the parser handles. Favicons are commonly multi-size ICOs, so this is a quick way to recover the original square PNGs from a site’s favicon.ico. Because each frame is independent, you can grab only the resolution you need.

Ad placeholder (rectangle)