ICNS to PNG

Nothing you choose here leaves your browser, and nothing is downloaded to make it work — not a library, not a codec, nothing. Apple's icon file holds PNGs, and your browser reads and writes those natively.

…or drop one anywhere on this page.

The largest picture in the icon, as an ordinary PNG.

An icon file holds the same artwork at up to eight sizes, and this lists every one of them before taking any. The largest is offered by default because it is usually what somebody wants, and the PNG inside is copied out rather than re-encoded — so what you get is exactly the bytes Apple's format was carrying.

What an .icns actually is

Four bytes saying icns, the length of the whole file, and then a run of chunks: four characters of type, a length, and a picture. Since 2008 those pictures have been ordinary PNGs, which is the entire reason this page needs nothing downloaded — there is no Apple-specific compression to implement, just a wrapper to read.

The length of a chunk includes its own eight bytes. That is the one thing to get wrong, and getting it wrong does not produce an error: every chunk after the first starts eight bytes late, the reader finds a type in the middle of a PNG, and it stops early with fewer icons than the file holds. It reports success.

The same size twice is not a mistake

Read a real icon file and two pairs jump out:

ic09 and ic14both 512 pixels across
ic08 and ic13both 256 pixels across

Those are the same icon at one and two pixels per point — 512 as a plain 512, and 512 again as the Retina version of 256. macOS picks whichever suits the display. It matters here because a reader that sorts by chunk name gets the sizes in the wrong order, and one that assumes each size appears once throws half the file away. The size is read out of each PNG's own header instead, which is eight bytes of work and never goes out of date when Apple adds a type.

What it will not do

Where to go next