Favicon sizes: the few files you need, and the ones you can skip

The favicon sizes that matter: favicon.ico, a 180px Apple touch icon, 192 and 512px PNGs. With the HTML tags, Google Search rules and cache fixes.

Search for favicon sizes and you’ll find lists of 20 or more files: 57px, 72px, 114px, 144px, tile images for Windows 8. Most of those were written for devices that are long gone. A site today needs a handful of files, and two of them do nearly all the work.

The favicon sizes you need

FileSizeUsed for
favicon.ico16, 32 and 48px in one fileBrowser tabs, bookmarks, and tools that request /favicon.ico directly
favicon-32x32.png32pxA sharper tab icon on high-resolution screens
favicon.svgAny sizeOptional. Sharp at every size, and can adapt to dark mode
apple-touch-icon.png180pxThe iPhone and iPad home screen
icon-192.png192pxAndroid home screen, listed in the web manifest
icon-512.png512pxAndroid splash screen and app install prompts
icon-maskable-512.png512pxAndroid icons cropped to a circle or other shape

If you only have ten minutes, make favicon.ico and apple-touch-icon.png. That covers browser tabs and iPhones. The Android icons and the manifest matter when people might add your site to their home screen.

You can safely skip the old lists: the other Apple sizes (iOS scales the 180px icon down), the mstile images and browserconfig.xml for Windows, and Safari’s pinned tab mask icon, which recent versions of Safari don’t need.

The HTML to add

Put the files in your site’s root folder, so they’re served at /favicon.ico and so on, and add these tags to the <head> of every page:

<link rel="icon" href="/favicon.ico" sizes="48x48">
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">

The manifest is a small JSON file that lists the Android icons:

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

Next.js handles the tags for you. Put favicon.ico, icon.png and apple-icon.png in the app folder and the <link> tags are added automatically.

Do you still need favicon.ico?

Yes. Browsers and other software still request /favicon.ico even when no tag points to it, and if it’s missing your server logs fill with 404s. It’s also the format with the widest support.

An ICO file is a container that holds several sizes of the same image, so a single file can cover 16, 32 and 48px. Renaming a PNG to .ico doesn’t create one, and even when browsers accept the result, other software may not. Use a real converter, like this PNG to ICO tool.

Should you use an SVG favicon?

An SVG stays sharp at every size and can respond to dark mode, because a CSS media query can sit inside the file:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <style>
    path { fill: #1a1a1a; }
    @media (prefers-color-scheme: dark) {
      path { fill: #ffffff; }
    }
  </style>
  <path d="M4 4h24v24H4z"/>
</svg>

It works in current versions of Chrome, Edge and Firefox. Browser support varies elsewhere, and Google Search doesn’t list SVG among the formats it reads for favicons, so treat it as an extra and keep favicon.ico alongside it:

<link rel="icon" href="/favicon.ico" sizes="48x48">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">

Designing an icon that survives 16 pixels

  • Use a symbol, not your whole logo. A wordmark turns to mush at 16px. Use the mark on its own, or the first letter of your name.
  • Fill the square. Empty transparent space around the artwork makes the icon look tiny next to the other tabs. Crop it tight.
  • Start big. Use a square source of at least 512px, or an SVG, and scale down. Scaling up a small image is what makes favicons blurry.
  • Check it on a dark tab. A black logo on a transparent background disappears in dark mode. A solid background shape, or a lighter version, fixes that.
  • Give home screen icons a solid background. iOS doesn’t keep transparency on the Apple touch icon, and transparent areas usually turn black.
  • Keep maskable artwork in the middle. Android can crop these icons into a circle, so the important part should sit inside the central 80% of the image.

How to get your favicon into Google Search

Google shows your favicon beside your site’s name in search results, which is the one place it might affect whether people click. Google’s rules are short:

  • The icon must be square and at least 8×8px. Google recommends going larger than 48×48px.
  • The tag must be on your home page, using rel="icon", apple-touch-icon or the older shortcut icon.
  • Supported formats are BMP, GIF, ICO, JPEG, PNG, PPM and TIFF. SVG isn’t on the list.
  • Googlebot must be able to crawl your home page, and Googlebot-Image must be able to crawl the icon. Check that robots.txt doesn’t block either one.
  • The icon shouldn’t be inappropriate, or Google may replace it with a default.

Updates aren’t instant. Google says recrawling can take from several days to several weeks. Requesting indexing of your home page in Search Console’s URL Inspection tool can speed that up.

Why your favicon isn’t updating

You uploaded a new icon and the old one is still there. That’s nearly always a cache: browsers hold on to favicons much longer than normal images.

  1. Open the icon’s URL directly, for example yoursite.com/favicon.ico, and reload it. If you see the new one, the server is fine and it’s only your browser’s cache.
  2. Add a version to the link so browsers treat it as a new file: <link rel="icon" href="/favicon.ico?v=2" sizes="48x48">
  3. Check the page in a private window, or on another device.
  4. If you use a CDN, purge the icon’s URL there as well.

Make the whole set from one image

The free Favicon Generator on BayaTools turns a logo, or a letter or emoji if you don’t have one, into a single ZIP: favicon.ico with 16, 32 and 48px inside, the PNG sizes, the Apple touch icon, the Android and maskable icons, a web manifest and the HTML tags to paste. It previews the icon on light and dark tabs and tells you if it’s too small or disappears on dark mode. It all runs in your browser, so your logo isn’t uploaded.

Need a share image too? That’s the picture people see when your link is posted on social media, and the OG Image Generator makes one the same way.

Tools from this guide

Quick answers

Make favicon.ico with 16, 32 and 48px inside it, plus a 180px Apple touch icon. Add 192px and 512px PNGs in a web manifest for Android. Start from a square image of at least 512px and scale down.

More guides