ImgKit

Favicon Guide: How to Create Perfect Website Icons

· 6 min read

A favicon is the small icon displayed in browser tabs, bookmarks, history, and search results next to your website's name. Despite its small size, a favicon plays a crucial role in brand recognition and user experience. A missing or broken favicon looks unprofessional and makes your site harder to identify among multiple open tabs. This guide covers everything you need to know about creating perfect website icons.

What Is a Favicon?

The term "favicon" is short for "favorites icon," originating from Internet Explorer's bookmark feature called "Favorites." Today, favicons appear in multiple contexts throughout the browser experience:

🛠️ Create your favicon

Favicon Generator → Image Cropper →

Sizes and Formats

Modern browsers and platforms require multiple favicon sizes and formats for optimal display:

ICO Format

The traditional favicon.ico placed in the website root directory. ICO files can contain multiple sizes in a single file (typically 16×16, 32×32, and 48×48 pixels). While older, this format provides maximum backward compatibility:

<link rel="icon" href="/favicon.ico" sizes="48x48">

PNG Format

PNG favicons offer better quality and transparency support. Modern browsers prefer PNG over ICO:

<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">

SVG Format

SVG favicons are scalable, look crisp at any size, and support CSS media queries for dark mode adaptation:

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

SVG favicons can use CSS prefers-color-scheme to display different colors in light and dark mode — a feature unique to the SVG format.

Complete Size Reference

Apple Touch Icons

Apple devices use a special icon format when users add your website to their home screen. The Apple Touch Icon should be a 180×180 pixel PNG file:

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">

Key guidelines for Apple Touch Icons:

Web App Manifest

The web app manifest (site.webmanifest or manifest.json) defines icons for Progressive Web Apps (PWAs) and Android home screen shortcuts:

{
  "name": "Your Site Name",
  "short_name": "YSN",
  "icons": [
    {
      "src": "/android-chrome-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/android-chrome-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "theme_color": "#ffffff",
  "background_color": "#ffffff",
  "display": "standalone"
}

Link the manifest in your HTML head:

<link rel="manifest" href="/site.webmanifest">

The Complete HTML Setup

Here is the recommended set of favicon tags for maximum cross-platform compatibility:

<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<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">
<meta name="theme-color" content="#ffffff">

Use our Favicon Generator to create all required sizes from a single source image. Need to crop your logo first? Try our Image Cropper.

Design Tips

Simplicity Is Key

Favicons are displayed at very small sizes (as small as 16×16 pixels). Complex designs with fine details will appear as unrecognizable blobs. Use simple shapes, bold colors, and minimal elements. A single letter or geometric symbol works best.

High Contrast

Ensure your favicon is visible against both light and dark browser themes. Test it on light tabs, dark tabs, and various operating system themes. A solid background color behind your icon ensures visibility in all contexts.

Brand Consistency

Your favicon should be instantly recognizable as part of your brand. Use your primary brand color and the most distinctive element of your logo. Many brands use a single letter (G for Google, F for Facebook) or a simplified icon version of their full logo.

Test at Small Sizes

Design at 512×512 or higher, but always test at 16×16 to ensure it remains legible. What looks great at 512px may be unrecognizable at 16px. Zoom out in your design tool to check small-size appearance.

Dark Mode Consideration

With SVG favicons, you can use CSS media queries to adapt colors for dark mode. For PNG/ICO favicons, choose colors that work in both light and dark contexts, or add a subtle border or background to ensure visibility.

Key Takeaways

Related Tools

Favicon Generator Image Cropper

Frequently Asked Questions

What is the best format for a favicon in 2026?

SVG is the best primary format — it is scalable, supports dark mode adaptation, and has a small file size. However, include PNG fallbacks (32×32 and 16×16) and an ICO file for maximum browser compatibility. The combination of SVG + PNG + ICO covers all modern and legacy browsers.

What size should a favicon be?

You need multiple sizes: 16×16 and 32×32 for browser tabs (PNG), 180×180 for Apple Touch Icons, and 192×192 plus 512×512 for Android/PWA via the web manifest. Design your source icon at 512×512 or larger and generate all sizes from it.

Why is my favicon not showing up?

Common reasons: aggressive browser caching (try Ctrl+Shift+R or clear cache), incorrect file path in the link tag, wrong MIME type, or the file is not accessible. Also ensure you are using absolute or root-relative paths. Check the browser console for 404 errors on the favicon request.

Can I use an animated favicon?

Some browsers support animated favicons (GIF or APNG), primarily Firefox. Chrome, Safari, and Edge do not display animated favicons. Animated favicons can also be distracting and increase CPU usage. For these reasons, static favicons are recommended for production websites.

How do I make a favicon work in dark mode?

Use an SVG favicon with embedded CSS that uses the prefers-color-scheme media query. Inside the SVG, define different fill colors for light and dark modes. This automatically switches the favicon appearance based on the user's system theme. PNG and ICO favicons cannot adapt to dark mode.