What is inside an ICO file
An ICO file is a small directory followed by images. The 6-byte header says how many images there are; a 16-byte entry for each gives its width, height, bit depth, length and position; then the images follow. This tool stores each size as a 32-bit PNG inside that container โ the format Windows has read since Vista and every current browser reads as a favicon. Older Windows XP-era software that expects bitmap entries may not show PNG-compressed icons.
Which sizes to include
For a favicon, 16, 32 and 48 pixels are enough: browsers pick 16 or 32 for tabs and bookmarks, and 48 is a common size for Windows desktop icons. Windows desktop and app icons use larger sizes, up to 256. Every extra size adds its PNG to the file, so leave out the ones you do not need.
How the small sizes are made
The source is first drawn into a square of up to 1024 pixels, then halved step by step down to each icon size. Shrinking in halves averages neighbouring pixels at each step, which keeps thin lines from breaking up the way a single jump from a large image to 16 pixels can. Fine detail still disappears at 16 ร 16 โ design the small sizes to be simple.