A favicon is the little icon in a browser tab, a bookmark list, a search result and - once someone saves your site to their phone - a home screen. A site without one shows a generic grey globe, which makes it look unfinished and harder to find among a dozen open tabs.
Making one is mostly a matter of producing the right handful of files at the right sizes and telling the browser where they are. This guide covers what those files are, how to get a good result from a logo that was never designed to be 16 pixels wide, and how to install them. The free Favicon Generator does the resizing and packaging in your browser, so you can follow along with your own image.
Which favicon sizes you actually need
Old checklists list twenty-odd files for platforms that no longer exist. A current site needs six files and a manifest:
- favicon.ico - one file holding 16, 32 and 48 pixel versions. Browsers request /favicon.ico on their own even when your HTML never mentions it, and Windows uses the 48 pixel copy for shortcuts.
- favicon-16x16.png and favicon-32x32.png - the tab and bookmark icons for browsers that prefer a PNG link. The 32 pixel one is what a high-resolution screen shows in a 16 pixel slot.
- apple-touch-icon.png at 180 x 180 - what iPhone and iPad use when someone adds your site to the home screen.
- android-chrome-192x192.png and android-chrome-512x512.png - used by Android and by the install prompt for web apps. The 512 version also appears on splash screens.
- site.webmanifest - a small JSON file that names your site and points at the two Android icons.
The .ico format is old, but it is still the one file every browser looks for without being told. Inside, it is simply a directory of images: a 6-byte header, a 16-byte entry per size, and then the pictures themselves. Modern .ico files store each picture as a PNG, which every current browser reads and which keeps all three sizes to a few kilobytes.
Start with the right source image
The largest icon in the set is 512 x 512, so start from an image at least that big. Anything smaller has to be enlarged for the Android icon and will look soft. An SVG is the best source of all, because it has no pixels of its own: the generator draws it fresh at a high resolution and every size comes out sharp.
More important than resolution is design. A full logo with a wordmark, a tagline and fine detail turns into a smudge at 16 pixels, where the whole icon is 256 pixels in total. The favicons that read well are simple: a single letter, a monogram or just the symbol part of the logo, in strong colours with good contrast. If your logo has a symbol and a name side by side, crop the symbol out first and use that.
Making a non-square logo square
Every favicon is square, and most logos are not. There are two honest ways to deal with that, and the generator offers both when your image is not square:
- Crop to square keeps the centre square and trims the long side equally from both ends. It fills the icon completely, but anything near the edges is lost.
- Fit inside square keeps the whole image and scales it down until the long side fits, leaving empty bands on the short side. Nothing is lost, but the artwork is smaller.
Here is a worked example. Take a 1200 x 800 logo. Crop to square keeps the middle 800 x 800 region, dropping 200 pixels from each side, and scales that to fill the 512 x 512 icon. Fit inside square instead scales the whole 1200 pixel width down to 512, a factor of about 0.427, so the artwork becomes 512 x 341 with a band of about 85 pixels above and below it. At 16 pixels the same fitted logo is only about 11 pixels tall - which is why a wide logo usually works better cropped to its symbol.
The padding slider adds empty space on every side. At 10% on a 512 icon, the artwork sits inside the middle 410 pixels with 51 pixels of margin all round. It stops a logo that touches its own edges looking cramped, especially on home screens that round the corners.
Transparent or coloured background?
Keep the background transparent if your logo works on both light and dark browser themes - the generator shows a preview of the tab in each so you can check. If a dark logo disappears on a dark tab bar, choose a solid background colour instead.
There is one exception you cannot opt out of. iOS does not support transparency on home-screen icons: it fills see-through areas with black, which turns a dark logo on a transparent background into a black square. So the generator always flattens the Apple touch icon onto your background colour, or onto white when the background is transparent. The other icons keep their transparency.
How to make a favicon, step by step
- Open the Favicon Generator and drop in your PNG, SVG, JPG or WebP. The file is read by your browser and never uploaded.
- If the image is not square, choose Crop to square or Fit inside square. Add padding if the artwork touches the edges.
- Pick a background: transparent, white, or a custom colour. That colour is also used for the theme and background colour in the web manifest.
- Optionally type your site's name. It goes into the manifest, and is shortened to 12 characters for the short name shown under a home-screen icon.
- Press Generate favicons. Check the light and dark tab previews and the size of each file, then use Download all (.zip) to get every file in one go.
Installing the files on your site
Unzip the files and upload them to the root folder of your website, so they are served at addresses like yoursite.com/favicon.ico and yoursite.com/apple-touch-icon.png. Then add these lines inside the head of every page - on most site builders and frameworks that means one shared layout or template:
- <link rel="icon" href="/favicon.ico" sizes="16x16 32x32 48x48">
- <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
- <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
- <link rel="manifest" href="/site.webmanifest">
The generator gives you the same snippet with a copy button. If your files live somewhere other than the root, change the paths in the snippet and in the manifest's icon list to match.
Why your new favicon is not showing
Browsers cache favicons more stubbornly than almost anything else, sometimes for days, and keep them separately from the page cache. If you replaced an old icon and still see it, open the site in a private window, or visit /favicon.ico directly and refresh that. Search results are slower still: Google recrawls favicons on its own schedule, and it wants a square icon whose size is a multiple of 48 pixels - the 48 pixel copy inside favicon.ico and the 192 pixel PNG both qualify.
If you need other sizes of the same image for social cards or app stores, the image resizer handles arbitrary dimensions, and Compress PNG can shave the 512 pixel icon down further without changing a pixel.
Frequently asked questions
- What size should a favicon be?
- There is no single size. Browser tabs use 16 x 16, or 32 x 32 on high-resolution screens, Windows shortcuts use 48 x 48, iOS home screens use 180 x 180 and Android uses 192 x 192 and 512 x 512. Start from a square image of at least 512 pixels and generate the whole set from it.
- Do I still need a favicon.ico file?
- Yes. Browsers request /favicon.ico automatically, even on pages that never link to it, and some tools, feed readers and older browsers only ever look there. One .ico holding 16, 32 and 48 pixel versions covers all of them in a few kilobytes, alongside the PNG icons for everything else.
- Can I use a JPG or SVG as a favicon?
- You can use either as the source image. Modern browsers also accept an SVG directly as a tab icon, but Safari's support and home-screen icons still need PNGs, and JPG has no transparency, so the safest result is a generated set of PNGs plus a favicon.ico.