How to create a favicon for your website

Recommended sizes, ICO or PNG, and the tags you need to add to your HTML.

A favicon is the small icon shown on the browser tab, in bookmarks and in history. It seems like a detail, but it helps people find your site among dozens of open tabs and looks professional. In this guide you'll see which sizes to use, the difference between ICO and PNG and the exact code to add to your site.

What a favicon is

The name comes from “favorite icon”. It appeared in Internet Explorer 5, in 1999, when the browser started looking for a file called favicon.ico at the root of websites. That behavior still exists: if you don't specify anything, browsers still try to fetch /favicon.ico.

Recommended sizes

Each place displays the icon at a different size. The main ones are:

SizeWhere it appears
16 × 16 and 32 × 32Tabs and bookmarks in desktop browsers.
48 × 48Windows shortcuts and some search results.
180 × 180Home screen icon on iPhone and iPad (apple-touch-icon).
192 × 192 and 512 × 512App icons on Android and installable sites (PWA).

Start from a square image of at least 512 × 512 pixels and generate the smaller sizes from it.

ICO or PNG?

The ICO format can store several sizes in a single file, which makes it the most compatible choice for the root favicon.ico. Current browsers also accept PNG and even SVG, which are easier to create and maintain.

The safest combination today is: a favicon.ico with 16, 32 and 48 pixels, a 180-pixel PNG for Apple devices and 192- and 512-pixel PNGs for Android. When you convert an image to ICO on ConverteTudo, sizes from 16 to 256 pixels are generated automatically inside the same file.

Design tips

  • Simplify: a full logo doesn't fit in 16 pixels. Use the brand symbol or initial.
  • Contrast: the icon must work on light and dark tabs. Test it in both themes.
  • Careful with transparency: transparent backgrounds look good on tabs, but on iPhone a transparent background turns black. Use a solid background for the apple-touch-icon.
  • Margin: leave a little breathing room at the edges, especially for Android icons, which may be cropped into a circle.

How to add it to your site

Place the files at the root or in an images folder and add these lines inside the <head> of every page:

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

The site.webmanifest file lists the 192- and 512-pixel icons and is used by Android when someone adds your site to their home screen.

Why isn't my favicon showing?

  • Cache: browsers keep the favicon for a long time. Test in a private window or add a parameter to the URL, such as favicon.ico?v=2.
  • Wrong path: check that the address in href opens the file directly in the browser.
  • Google: the icon in search results can take days or weeks to update and must be a multiple of 48 pixels.

Conclusion

A good favicon is simple, legible at tiny sizes and delivered in the right formats. With an ICO file for compatibility, PNGs for mobile devices and four lines of HTML, your site becomes recognizable in any tab, bookmark or home screen.

Try it now

Convert your images for free, in batches and without signing up.

Open the Image Converter