Guide

How to Add a Favicon to HTML

Adding a favicon to a plain HTML page is a one-line change — but the modern, complete setup is six lines and covers iOS, Android, dark mode, and PWA install.

Check favicons on any website

Install the FetchFavicon Chrome Extension to extract, preview, and validate favicons instantly.

Install Chrome Extension

The tag every browser respects is . Package all your icon files with our Favicon Generator and get paste-ready head tags using our Favicon HTML Snippet generator.

The remaining 20% — apple-touch-icon, PNG variants, SVG with dark-mode support, and a webmanifest — is what separates a default icon from a polished brand experience.

How it works

  1. 1

    Generate your favicon package

    Use the FetchFavicon package generator — produces every file you need plus paste-ready markup.

  2. 2

    Drop files at the site root

    favicon.ico, apple-touch-icon.png, android-chrome-192/512.png, site.webmanifest.

  3. 3

    Paste the snippet into <head>

    Six <link> tags + one <meta name="theme-color">.

Platform Dimension Specifications & Compression Benchmark

Standard dimension requirements across search engines, mobile OS, and WebAssembly Oxipng lossless byte reduction.

WebAssembly Oxipng Lossless
Platform Dimension Specifications & Compression Benchmark
Target Platform / OSRequired DimensionsFormat & DeliveryOxipng Wasm WeightByte Savings
Google Search SERP48×48 px (multiples of 48).ico, .png4.6 KB-68.9%
Apple iOS / iPadOS Safari180×180 px.png (apple-touch-icon)14.8 KB-67.9%
Android Chrome & PWA192×192 px & 512×512 px.png (site.webmanifest)59.1 KB-69.3%
Windows Edge & Desktop16×16, 32×32, 48×48 pxMulti-resolution .ico8.8 KB-69.5%
Legacy Web Browsers32×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.

Try it now

Get the HTML snippet

Favicon Generator

FAQ

Where do the <link> tags go?+

Inside <head>, anywhere — order does not matter as long as they come before </head>.

Do I need both .ico and PNG?+

Yes. .ico is the universal fallback; PNG renders sharpest on high-DPI screens.

What about dark mode?+

Ship an SVG variant that embeds a prefers-color-scheme media query inside its <style> block.

Related tools

Related guides

Guides →