ICNS to JPG

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, flattened onto a background.

A JPEG cannot hold transparency and a Mac icon nearly always has some, so the transparent parts are filled with the colour chosen above rather than left to become black. If the shape matters, PNG is the right target and this one is not.

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