What you get and where it goes
| File | Size | Used by |
|---|---|---|
| favicon.ico | 16, 32 and 48 px in one file | Browser tabs, bookmarks, and anything that asks for /favicon.ico |
| favicon-32.png | 32 px | A plain PNG tab icon, if you prefer PNG |
| apple-touch-icon.png | 180 px | iPhone and iPad home screen shortcuts |
| icon-512.png | 512 px | High-resolution uses, such as a web app manifest you write yourself |
The HTML box gives you these lines for the head of every page:
<link rel="icon" href="/favicon.ico" sizes="32x32"> <link rel="icon" href="/icon-512.png" type="image/png" sizes="512x512"> <link rel="apple-touch-icon" href="/apple-touch-icon.png">
Inside the ICO file
An ICO is a small folder in one file: a 6-byte header, a 16-byte entry for each picture, then the pictures themselves. Here the three sizes are stored as PNG data, which current browsers read. That is 6 + 3 × 16 = 54 bytes before the first picture starts. The browser picks the size that suits the screen.
How the text is sized
A single character is drawn at 68% of the icon's height, and two or three characters at 50%, then multiplied by Text size (60 to 130%). On a 16 px icon, one letter at 100% gets a font size of about 11 px. That is why one bold letter usually reads better than three.
Tips
- Use strong contrast. A ratio of at least 3:1, the WCAG 2.2 minimum for graphics (success criterion 1.4.11), is a sensible floor; test it with the contrast checker.
- Emoji are drawn with your device's emoji font, so the icon matches the style of the device you made it on.
- No web manifest is made. For an installable web app you also need a 192 px icon, which you can make by shrinking the 512 px file with the image compressor.
- Browsers cache favicons for a long time. Check a new one in a private window.