Overview
ICO is the icon file format used by Microsoft Windows to store small images that represent applications, files, folders, and shortcuts in the operating system's graphical user interface. A distinctive feature of the ICO format is its ability to contain multiple image variants at different sizes and color depths within a single file, allowing the operating system to select the most appropriate version based on the display context — a small 16x16 icon for a menu, a medium 32x32 for the desktop, and a large 256x256 for the modern file explorer's thumbnail view.
Beyond the Windows desktop, ICO achieved a second life on the web as the format for favicons — the small icons displayed in browser tabs, bookmarks, and history entries. When Tim Berners-Lee and the early browser developers needed a mechanism for websites to provide a custom icon, the convention emerged of placing a favicon.ico file at the root of the web server. This convention persists today, although modern browsers also accept PNG and SVG favicons via the <link rel="icon"> HTML tag.
Each image within an ICO file can be stored as either a BMP (without the file header) or a PNG-compressed image. The PNG option, supported since Windows Vista, is generally used for the 256x256 size to keep the file compact, while smaller sizes often remain in BMP format for maximum compatibility with legacy software and operating system components.
History
The ICO format dates back to Windows 1.0 in 1985, where it was used to represent applications and files in the graphical shell. The original format supported only small images (32x32 pixels or less) at low color depths (monochrome or 16 colors). As display technology advanced, Microsoft expanded the format to support 256 colors (Windows 95), 24-bit true color (Windows XP), 32-bit RGBA with full alpha-channel transparency (Windows XP), and PNG-compressed 256x256 images (Windows Vista).
The favicon convention was introduced by Internet Explorer 5 in 1999, which automatically requested /favicon.ico from any visited website. Other browsers adopted the convention, and the HTML 4.01 specification formalized the <link rel="icon"> element for declaring icon resources. Today, while web best practices recommend providing multiple icon formats and sizes (including Apple Touch Icons and web app manifest icons), the favicon.ico file remains a universal fallback that every browser supports.
Technical Details
An ICO file begins with a 6-byte header: two reserved zero bytes, a 2-byte type field (1 for icons, 2 for cursors), and a 2-byte count of images in the file. Following the header is a directory of 16-byte entries, each specifying the image's width, height (0 means 256), color count (0 for more than 255 colors), color plane count, bits per pixel, data size, and offset within the file.
Each image entry contains either a complete BMP structure (minus the 14-byte BITMAPFILEHEADER) or a PNG file. BMP-format icon images include both an XOR mask (the color image) and an AND mask (a 1-bit-per-pixel transparency mask) for legacy compatibility. Modern 32-bit BMP entries use the alpha channel in the BGRA pixel data instead of the AND mask. Common sizes included in a typical ICO file are 16x16, 24x24, 32x32, 48x48, 64x64, and 256x256 pixels. The closely related CUR (cursor) format uses the same structure but interprets two header fields as hotspot coordinates instead of color planes.
Pros & Cons
Pros
- Multi-resolution: stores multiple sizes in a single file for automatic selection
- Alpha-channel transparency support for smooth icon edges on any background
- Universal browser support as the favicon format for website identity
- Native Windows integration for application, file type, and shortcut icons
- Backward compatibility spanning nearly four decades of Windows versions
Cons
- Maximum image size of 256x256 is insufficient for modern high-DPI displays
- File format is Windows-centric with limited relevance on macOS and Linux
- Multi-image files can become large when including many size variants
- No animation support (animated cursors use the separate ANI format)
- Being gradually superseded by SVG and PNG favicons in web development
Common Use Cases
- Providing application icons for Windows desktop software and installers
- Serving the favicon.ico file for website tab icons and bookmarks
- Creating file-type icons for Windows Shell associations
- Designing toolbar and menu icons for Windows-native applications
- Building icon packs and themes for Windows desktop customization