On MacOS
- Open file in Preview.
- Click and drag mouse to select desired portion of file (pay attention to aspect ratio tool tip, ensure selection is a square).
- Crop image (Tools → Crop).
- Adjust Size (Tools → Adjust Size...).
- Ensure resolution is 72 pixels/inch.
- Set height/width to 32 pixels.
- Export as ICO file (File → Export...).
- Hold option key when clicking Format selector to show all possible options.
- ICO filetype may be labeled as "ICO" or "Microsoft Icon".
- Move favicon.ico to website source root.
- Add
<link rel="icon" type="image/vnd.microsoft.icon" sizes="32x32" href="favicon.ico">
to html file <head>
attribute.