Favicons: the sizes and formats you actually need

favicon.ico, SVG, the Apple touch icon and manifest icons: a short list of files that covers every browser and phone.

Cover image for Favicons: the sizes and formats you actually need

The favicon is the small icon on browser tabs, bookmarks and history, and on phone home screens when someone saves your site. It's a small detail, but a missing or blurry one makes a site look unfinished. Over the years the advice has grown into long lists of sizes; in practice you need only a few files.

The files you need

File Size Used by
favicon.ico 16, 32 and 48 px, in one file Browsers that look for /favicon.ico by default, plus some tools and feed readers
icon.svg Any Modern browsers, for sharp tabs at every size
apple-touch-icon.png 180 × 180 px iPhone and iPad home screens
icon-192.png and icon-512.png 192 and 512 px Android home screens and installed web apps, through the web app manifest

That covers every current browser and phone.

The HTML

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

And the manifest file, for Android and installed-app icons:

{
  "name": "Your Site",
  "icons": [
    { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
    { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
  ]
}

Keep favicon.ico in the root of your site even though you link to it, because some software asks for /favicon.ico without reading your HTML.

Designing for 16 pixels

A favicon is tiny, so the full logo rarely works. Use the brand's simplest mark, an initial or a symbol, with bold shapes and strong contrast; fine lines and small text disappear at 16 pixels. Look at it in a real browser tab, in light and dark mode: an icon that's dark on a transparent background can vanish on a dark tab bar. A solid background, or an SVG that changes colour with a prefers-color-scheme media query, solves that.

For the Apple touch icon, use a solid background. iOS doesn't show transparency there and fills it in itself, and it rounds the corners for you, so don't round them in the image.

Favicons in search results

Google shows a site's favicon next to its search results. It asks for a square icon whose size is a multiple of 48 pixels (48 × 48, 96 × 96 and so on), linked from the home page, and it accepts SVG. The 48-pixel size in your favicon.ico, or the SVG icon, covers that. Like everything Google crawls, a new favicon can take some time to appear in results.

Making the files

Start from a square image at least 512 pixels wide, ideally exported from the vector logo.

  • Create favicon.ico with PNG to ICO, choosing the 16, 32 and 48 pixel sizes. It can include sizes up to 256.
  • If your source image is a JPG, use JPG to ICO.
  • Shrink the PNG icons with the Image optimizer.

Checking that it worked

  • Open https://yourdomain.com/favicon.ico in a browser. You should see the icon, not an error page.
  • Add the site to your phone's home screen to see the Apple touch icon or the Android icon.
  • In Chrome's developer tools, the Application panel shows your manifest and the icons it found, with warnings about missing sizes.

Browsers hold on to favicons stubbornly. If you replace yours and still see the old one, try a private window before deciding the change didn't work.