# Which favicons does a website need?

Which favicon files and sizes a website really needs today – favicon.ico, SVG, Apple touch icon and web manifest – including the HTML.

Web page: https://skriptbox.com/en/guides/which-favicons-does-a-website-need

Search for favicons and you’ll quickly find lists of twenty files or more: Apple icons in eight sizes, Windows tiles, separate Android variants. Most of them date back to a time when every platform demanded its own format. Today, four files and four lines of HTML are enough.

This guide shows the set that makes sense in 2026, the matching HTML, what you can safely leave out, and what Google looks for when it shows favicons in search results.

## The set you need today

| File | Size | Purpose |
| --- | --- | --- |
| `favicon.ico` | 16, 32 and 48 px in one file | fallback for all browsers and tools that only ask for `/favicon.ico` |
| `icon.svg` | vector, scales to any size | crisp rendering in modern browsers, optionally with dark mode |
| `apple-touch-icon.png` | 180 × 180 px | home screen and bookmarks on iPhone and iPad |
| `icon-192.png`, `icon-512.png` | 192 and 512 px | web manifest: Android, installed web apps, home screen |

The ICO file belongs in the root directory of your domain. Many browsers, feed readers and other tools request `/favicon.ico` directly, even without a hint in the HTML. It holds several bitmaps, so there’s a suitable version for each display size.

The [Favicon Generator](https://skriptbox.com/en/tools/favicon-generator) creates all of these files from a logo or a letter, including the web manifest and HTML code, as a ZIP. If your logo only exists as a very large file, say a photo of several megabytes, bring it down to a manageable size first with [Resize & convert images](https://skriptbox.com/en/tools/image-resizer) and convert it to PNG if needed.

## The HTML code

These four lines go into the `<head>` of every page:

```
<link rel="icon" href="https://skriptbox.com/favicon.ico" sizes="32x32">
<link rel="icon" href="https://skriptbox.com/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="https://skriptbox.com/apple-touch-icon.png">
<link rel="manifest" href="https://skriptbox.com/site.webmanifest">
```

The `sizes="32x32"` attribute on the ICO file is there for a practical reason: without it, some Chromium versions preferred the ICO file over the SVG. This way, browsers that support SVG pick the SVG file and all others take the ICO. The old `rel="shortcut icon"` spelling is no longer needed.

The web manifest is a small JSON file. For favicons, the icons are what matters:

```
{
    "name": "Example Inc.",
    "short_name": "Example",
    "icons": [
        { "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
        { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" },
        { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
    ],
    "theme_color": "#ffffff",
    "background_color": "#ffffff",
    "display": "standalone"
}
```

Android may crop an icon with `"purpose": "maskable"` into a circle, a teardrop or a square. To make sure nothing gets cut off, the artwork has to fit into a centered circle about 80% of the width – the “safe zone” from the [Web App Manifest specification](https://www.w3.org/TR/appmanifest/). If your icon already has plenty of padding, the same file will do. If the logo reaches the edges, a separate version with more padding is worth it.

## SVG favicon with dark mode

An SVG favicon is crisp at any size, often only a few hundred bytes, and can react to the color scheme. With `prefers-color-scheme` in the embedded stylesheet, you adjust the colors for dark interfaces:

```
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <style>
    circle { fill: #0b5cad; }
    @media (prefers-color-scheme: dark) {
      circle { fill: #8cc4ff; }
    }
  </style>
  <circle cx="16" cy="16" r="15"/>
</svg>
```

Chromium-based browsers and Firefox have supported SVG favicons for years; Safari ignored them for a long time, and older versions fall back to the ICO file or the Apple touch icon. The media query follows the color scheme of the operating system or browser, not necessarily the actual color of the tab bar. Artwork that works on both light and dark backgrounds is therefore the safer choice – dark mode is an extra.

## What you can leave out

- **Dozens of PNG sizes** such as 57, 72, 114, 144 or 152 px for older iPhones and iPads: current devices use the 180 px icon and scale it as needed.
- **Windows tiles** (`msapplication-TileImage`, `msapplication-TileColor`, `browserconfig.xml`): they were meant for the Start tiles of Windows 8 and 10 and legacy Edge, and current systems no longer use them.
- **Safari pinned tab** (`<link rel="mask-icon">`): newer Safari versions show the regular favicon in pinned tabs. The monochrome mask doesn’t hurt, but you can do without it.
- **Separate Android icons** in 36, 48, 72 or 96 px: the manifest with 192 and 512 px covers that.

## Favicons in Google search results

Google shows the favicon next to the site name in search results. Google Search Central lists the requirements in its article on [favicons in Google Search](https://developers.google.com/search/docs/appearance/favicon-in-search). The key points:

- The favicon is declared on the home page with `<link rel="icon">`.
- It’s square. Google recommends at least 48 × 48 px; multiples of 48 px (48, 96, 144 …) are the safe choice. An SVG file meets this without a fixed size, and for the ICO file the 48 px variant helps.
- Neither the favicon file nor the home page may be blocked for Googlebot in `robots.txt`.
- The URL should be stable and not change all the time. Changing it once when you replace the icon is fine.
- Google shows one favicon per hostname. Subdomains can have their own, subdirectories can’t.

Google only picks up changes once the home page has been crawled again. That can take days to weeks.

## Designing for small sizes

In a browser tab, your icon is shown at 16 × 16 pixels, or 32 on high-resolution displays. A complete logo with lettering is no longer legible at that size. What works well:

- a single letter, a logo mark or a simplified detail of the logo instead of the full wordmark
- bold shapes without fine lines that disappear at 16 px
- strong contrast between artwork and background
- a colored background or a clear outline if the artwork has to work on both light and dark backgrounds
- an opaque background for the Apple touch icon: transparent areas aren’t shown as see-through there but get filled by the system

Check the result at actual size in a light and a dark tab, not just in the enlarged preview.

## When the new favicon doesn’t show up

Browsers cache favicons stubbornly, sometimes separately from the regular page cache. After replacing one, you’ll often see the old icon for days. What helps:

- adding a version parameter to the links, such as `href="https://skriptbox.com/icon.svg?v=2"`, so the browser fetches the file again
- checking the page in a private window or a different browser
- purging the icon files from your CDN cache, if you use one
- re-creating bookmarks and home screen icons – they often keep the old icon

The `/favicon.ico` file itself should keep its name, because many tools request exactly that URL.

### Quick summary

- `favicon.ico` (16, 32, 48 px) in the root directory, `icon.svg`, `apple-touch-icon.png` (180 px) and a manifest with 192 and 512 px
- four `<link>` lines in the `<head>`, no Windows tiles and no collection of sizes
- simple, high-contrast artwork that remains recognizable at 16 px
- for Google: square, multiples of 48 px, crawlable


## Tools for this topic

- [Favicon Generator](https://skriptbox.com/en/tools/favicon-generator.md) – Create favicons from a logo or a letter – with favicon.ico, SVG, Apple and Android icons and HTML code as a ZIP.
- [Resize & Convert Images](https://skriptbox.com/en/tools/image-resizer.md) – Resize photos for free and convert them to WebP, JPG or PNG – no upload, right in your browser.
