How to Add a Favicon in HTML
Three tags cover 99% of cases. Two more give you a full PWA-grade setup.
Check favicons on any website
Install the FetchFavicon Chrome Extension to extract, preview, and validate favicons instantly.
The minimum tag
<link rel="icon" href="/favicon.ico"> — that's it. Every browser will fetch it.
The modern recommended set
Add SVG and apple-touch-icon for crisp rendering on every platform:
<link rel="icon" href="/favicon.ico">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
PWA install prompts
Add a manifest.json with 192×192 and 512×512 PNG entries, then link <link rel="manifest" href="/site.webmanifest">.
Platform Dimension Specifications & Compression Benchmark
Standard dimension requirements across search engines, mobile OS, and WebAssembly Oxipng lossless byte reduction.
| Target Platform / OS | Required Dimensions | Format & Delivery | Oxipng Wasm Weight | Byte Savings |
|---|---|---|---|---|
| Google Search SERP | 48×48 px (multiples of 48) | .ico, .png | 4.6 KB | -68.9% |
| Apple iOS / iPadOS Safari | 180×180 px | .png (apple-touch-icon) | 14.8 KB | -67.9% |
| Android Chrome & PWA | 192×192 px & 512×512 px | .png (site.webmanifest) | 59.1 KB | -69.3% |
| Windows Edge & Desktop | 16×16, 32×32, 48×48 px | Multi-resolution .ico | 8.8 KB | -69.5% |
| Legacy Web Browsers | 32×32 px / 16×16 px | .ico (/favicon.ico) | 3.1 KB | -67.0% |
* Benchmark measurements based on lossless RGBA Oxipng WebAssembly compression executing locally in modern web browsers.
FAQ
What is the minimum HTML tag for a favicon?
Add <link rel="icon" href="/favicon.ico"> inside <head>. Place favicon.ico at your site root and every browser will find it.
Do I need separate tags for PNG and SVG favicons?
Yes for a modern setup. Link favicon.ico as the fallback, then add <link rel="icon" type="image/png"> and optionally type="image/svg+xml" for sharper rendering.
Where should favicon <link> tags go in HTML?
Inside the <head> element, before </head>. Order among icon links does not matter.
Do I need a web manifest for favicons?
Not for basic tabs, but add <link rel="manifest"> plus 192×192 and 512×512 PNG icons if you want PWA install prompts.