Home / Favicon guides / Guide: favicon size

Favicon Size Guide

Which favicon sizes and files a website needs, what each one is for, and the code to add them.

The short answer

A modern site needs only a few files. Many old guides list a dozen sizes, but today a short list covers every browser and device.

FileSizeUsed for
favicon.ico32 by 32 (or 16, 32 and 48 inside)Browser tabs and bookmarks, and every browser as a fallback
icon.svgAny sizeModern browsers, sharp at every size, can adapt to dark mode
apple-touch-icon.png180 by 180iPhone and iPad home screens
icon-192.png192 by 192Android home screen and installed web apps
icon-512.png512 by 512Android splash screens and installed web apps

Why so many sizes?

A favicon is drawn at 16 by 16 pixels in a normal tab, and at 32 by 32 on a high density screen. Other places use the icon larger: a shortcut on a desktop, a phone home screen, a search result. Each place asks for a size, and a file made for that size looks sharper than a big one squeezed down.

Favicons in Google Search

Google can show your favicon next to your site in search results. Its documentation asks for a square image whose size is a multiple of 48 pixels, such as 48 by 48 or 96 by 96, and a single icon address for the whole site. A 48 pixel icon inside favicon.ico, or a 192 pixel PNG, meets this.

The code

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

The manifest lists the two larger icons:

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

An SVG favicon that follows dark mode

An SVG icon can contain a style rule, so it can change color when the browser is in dark mode:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <style>
    circle { fill: #2b5cb8 }
    @media (prefers-color-scheme: dark) { circle { fill: #9db7ee } }
  </style>
  <circle cx="16" cy="16" r="14"/>
</svg>

Designing for 16 pixels

  • Use one simple shape or one letter. Fine lines and small text turn to mush.
  • Use strong contrast, and test the icon on light and dark tabs.
  • Start from a large square image or a vector, and let the tool shrink it.
  • Leave a little padding for the Apple touch icon, and give it a solid background.

Check and preview your favicon

Drop your current favicon in the favicon size tool to list the sizes inside it and see whether it meets the 48 pixel rule. Then use the favicon preview to see it in light and dark tabs, a search result and on a phone.

When the old icon will not go away

Browsers keep favicons for a long time. After you replace the file, clear the browser cache, or open the site in a private window. You can also change the link address, for example /favicon.ico?v=2, to force a new download.

To make every file in this guide from an image, a letter or an emoji, use the favicon generator, or favicon from image. For one file, see PNG to ICO or the Apple touch icon maker.

Make your icons now. Create a favicon from an image, a letter or an emoji and get every file you need.

Open the favicon generator

Frequently asked questions

What is the best favicon size?

Provide a favicon.ico with 16, 32 and 48 pixel images, an SVG if you can, a 180 pixel Apple touch icon, and 192 and 512 pixel PNG icons for Android.

Is 16x16 enough for a favicon?

It is the size shown in a normal tab, but high density screens use 32 by 32, so a 16 pixel icon alone looks blurry.

Do I still need favicon.ico?

Yes, it is the safest fallback. Browsers request /favicon.ico by themselves, and it works everywhere.

Can a favicon be an SVG?

Yes. Modern browsers support SVG favicons, which stay sharp at any size and can follow dark mode.