Complete Favicon Guide

Everything you need to know about favicons. Learn about required sizes, formats, HTML implementation, and best practices for creating website icons.

What is a Favicon?
Understanding favicons and their importance

A favicon (short for "favorite icon") is a small icon associated with a website that appears in browser tabs, bookmarks, browser history, and shortcuts. It helps users quickly identify your website visually and enhances brand recognition.

Browser Tabs

Appears in browser tabs to help users identify open websites

Bookmarks

Displayed in browser bookmarks and favorites for quick identification

Mobile Home

Used when users add your website to their mobile home screen

Required Favicon Sizes
All the sizes you need for complete favicon support

Standard Browser Sizes

16×16px
Classic

Standard browser tab size for older browsers

32×32px
High-res

High-resolution browser tab for modern displays

96×96px
Desktop

Desktop shortcut icon size

Mobile Device Sizes

180×180px
Apple Touch

Apple Touch Icon for iOS devices

192×192px
Android

Android Chrome icon size

512×512px
Android

Android home screen icon

Favicon Formats
Understanding ICO, PNG, and SVG favicon formats

ICO
ICO Format

ICO (Icon) is the traditional favicon format. It can contain multiple sizes in a single file, making it ideal for compatibility with older browsers.

Advantages

  • Multiple sizes in one file
  • Universal browser support
  • Classic format standard

Best For

  • Maximum compatibility
  • Older browser support
  • Traditional implementations

PNG
PNG Format

PNG favicons are required for high-resolution displays and modern browsers. They offer better compression and quality than ICO for specific sizes.

Advantages

  • Better compression
  • High-resolution support
  • Modern browser standard

Best For

  • Modern browsers
  • Retina displays
  • Mobile devices

SVG
SVG Format

SVG (Scalable Vector Graphics) favicons are scalable and work at any size. However, browser support varies, so they should be used alongside traditional formats.

HTML Implementation
How to implement favicons in your HTML

Basic Implementation

<link rel="icon" type="image/x-icon" href="/favicon.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">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">

Complete Implementation

<!-- Standard favicons -->
<link rel="icon" type="image/x-icon" href="/favicon.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">

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

<!-- Android Chrome -->
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">

<!-- Web App Manifest -->
<link rel="manifest" href="/site.webmanifest">
Best Practices

Use Simple Designs

Favicons are displayed at very small sizes. Use simple, recognizable designs that work well when scaled down.

High Contrast

Ensure your favicon has high contrast for visibility at small sizes and in various browser themes.

Include All Sizes

Provide all required sizes for maximum compatibility across browsers and devices.

Test Across Platforms

Test your favicons on different browsers, devices, and operating systems to ensure they display correctly.