JPG to ICNS

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.

Sizes to include
…or drop one anywhere on this page.

A JPG has no transparency, so the icon will have a background.

Whatever surrounds the subject in the JPG surrounds it in the icon, on every background it ever sits on — and on a Mac that includes whatever picture somebody has set as their desktop. It is usually white and it usually looks like a mistake. If the original exists as a PNG or an SVG, start from that instead.

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