What a favicon is used for
The favicon is the small icon shown in browser tabs, bookmarks, history lists and next to your pages in Google’s mobile and desktop search results. When someone adds your site to the home screen of a phone, a larger version of the same icon becomes the app icon. A clear, recognisable favicon helps people find your tab among a dozen others, and a missing one makes a site look unfinished; the browser also requests /favicon.ico on every new visit and logs an error if it does not exist.
The files in the package
favicon.ico holds three images in one file: 16 × 16 pixels for tabs on standard screens, 32 × 32 for high-resolution screens and the Windows taskbar, and 48 × 48 for desktop shortcuts. The images inside are stored as PNG, which keeps their transparency and is supported by all current browsers.
apple-touch-icon.png (180 × 180) is used by Safari on iPhone and iPad when a page is added to the home screen, and in some bookmark views. It has no transparency, because iOS would show transparent areas as black.
icon-192.png and icon-512.png are referenced from site.webmanifest. Chrome on Android uses them for home screen shortcuts and installed web apps, and the 512 px version is shown on the splash screen while an installed app starts. The manifest also sets the theme and background colour to the colour you picked.
If you start from an SVG file, icon.svg is added too. Browsers that support vector favicons use it and get a perfectly sharp icon at every size and zoom level.
Getting a sharp result
Every icon is scaled from a 512 × 512 pixel master image with a high-quality Lanczos filter, so start from the largest version of your logo you have, ideally the SVG or a PNG of at least 512 pixels. Small icons work best with bold shapes and strong contrast: wordmarks and slogans become unreadable below 48 pixels, so many brands use just their initial or symbol as a favicon.
A logo with a transparent background looks good on light browser themes but can disappear on a dark tab bar. If your logo is dark, consider a solid background colour, or add a light outline to the logo itself.
To prepare the source image first, the circle crop tool makes a round logo with a transparent background, and the image converter turns WebP, HEIC or AVIF artwork into PNG.