HomeBlogHow to Make a Favicon for Your Website: Sizes, Formats and Setup
DesignNovember 22, 20265 min read

How to Make a Favicon for Your Website: Sizes, Formats and Setup

Favicons appear in browser tabs, bookmarks, search results and phone home screens, and each place wants something slightly different. Here are the sizes and formats you need and how to add them.

A favicon is the small icon that appears in a browser tab next to your page title. It also shows up in bookmarks, browser history, Google's mobile search results, and on phone home screens when someone saves your site. It is tiny, but a missing or blurry favicon makes a site look unfinished, and a clear one makes your tab easy to find among twenty others.

The confusing part is that different browsers and devices look for different files. This guide cuts through that: which sizes actually matter, which formats to use, how to create them from your logo, and the exact HTML to add.

Start with the right source image

Everything is easier if you begin with a good source file:

  • Square. Favicons are square. If your logo is wide, use just the symbol or the first letter rather than squeezing the whole wordmark in.
  • Simple. At 16 by 16 pixels, there are only 256 pixels to work with. Fine lines, small text and subtle gradients disappear. Bold shapes and strong contrast survive.
  • Large. Work from at least 512 by 512 pixels, ideally a vector SVG, and scale down. Scaling up a small image always looks soft.
  • Tested on light and dark. Browser tabs can be light or dark. A dark logo on a transparent background may vanish in dark mode; a subtle outline or a solid background shape helps.

The sizes and files that matter

You will find lists online with twenty or more icon sizes. Most of those are leftovers from older platforms. For a modern website, this set covers practically everything:

FileSizeFormatUsed by
favicon.ico16x16, 32x32 (optionally 48x48)ICOFallback for all browsers; requested automatically from the site root
favicon-32x32.png32x32PNGBrowser tabs on standard and high-density screens
icon.svgScalableSVGModern browsers that support SVG favicons
apple-touch-icon.png180x180PNGiPhone and iPad home screen bookmarks
icon-192.png and icon-512.png192x192 and 512x512PNGAndroid home screen and installable web apps, via a web app manifest

A few format notes are worth knowing:

  • ICO is a container. A single favicon.ico file can hold several images at different sizes, and the browser picks the one it needs. Modern ICO files can store each size as an embedded PNG.
  • SVG favicons stay sharp at any size and can even adapt to dark mode using a CSS media query inside the SVG. Support is good in Chrome, Edge and Firefox, but Safari has historically lagged, so always keep PNG or ICO fallbacks.
  • The Apple touch icon should not be transparent. iOS fills transparent areas with a solid color, which often looks wrong. Give it a solid background and a little padding, and let iOS round the corners itself.
  • Google Search shows favicons next to results. Google asks for a square icon and recommends making it larger than 48 by 48 pixels, so providing 192 or 512 pixel versions helps.

Creating the files step by step

  1. Prepare a square master image. If your logo is an SVG, our SVG to PNG converter turns it into a PNG. It renders the SVG at its own declared size, so if the result is small, edit the width and height attributes in the SVG file to 512 before converting.
  2. Generate the standard sizes. Upload the master image to our favicon generator. It accepts PNG, JPG, WebP, GIF, BMP and SVG, and produces PNG icons at 16, 32, 48, 64, 128 and 256 pixels, plus a favicon.ico. Click any size to download it. If your image is not square, it is scaled to fill the square and the edges are cropped evenly, so make sure the important part of your logo is centered.
  3. Create the larger PNGs. The generator's largest output is 256 pixels, so for the 180 pixel Apple touch icon and the 192 and 512 pixel manifest icons, resize your square master image to those exact dimensions with the image resizer. Keep the aspect ratio locked.
  4. Check the ICO. The generator's favicon.ico contains a single 32 by 32 image, which browsers scale for tabs. That works well in practice. If you already have a PNG you want to turn into an ICO, the PNG to ICO converter does that directly; images larger than 256 by 256 are scaled down, and the output also contains one size. If you specifically need several sizes inside one ICO file, you will need a desktop icon editor.
  5. Look at them at actual size. View the 16 and 32 pixel versions at 100% zoom. If the shape is unrecognizable, simplify the design for the small sizes.

Adding favicons to your site

Place the files in your site's root folder, then add these lines inside the <head> of your pages:

<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<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 sizes="any" on the ICO line stops some browsers from choosing it over the SVG. If you do not have an SVG version, simply leave that line out.

The manifest is a small JSON file that lists your 192 and 512 pixel icons, along with your site name and theme color. It is what Android uses when someone adds your site to their home screen. The MDN documentation on web app manifests shows the format.

Many frameworks and site builders have their own conventions. Some pick up files named favicon.ico or icon.png from a specific folder automatically, and platforms like WordPress have a "Site Icon" setting that generates the tags for you. Check your platform's documentation before adding tags by hand, so you do not end up with duplicates.

Troubleshooting

  • The old icon still shows. Browsers cache favicons aggressively. Try a private window, clear the cache, or add a version query to the file path, such as /favicon.ico?v=2.
  • Google shows a generic globe. Make sure the favicon is not blocked by robots.txt and is reachable at a stable URL. Search results can take days or weeks to update after a change.
  • The icon looks blurry. It is probably being scaled up from a smaller file. Provide a 32 pixel PNG for tabs and larger files for other uses.
  • A black square appears on iPhone. Your Apple touch icon has a transparent background. Add a solid one.

Final thoughts

You do not need dozens of files. An ICO fallback, a 32 pixel PNG, an optional SVG, a 180 pixel Apple touch icon and 192 and 512 pixel manifest icons cover the browsers and devices people actually use. Start from a simple, square, high-resolution design, check the small sizes at 100% zoom, and your site will look polished in every tab.

faviconicoweb designiconspng
Favicon Guide: Sizes, Formats and HTML Setup