What is ICO?
The essential icon format for Windows applications and website favicons
ICO is the image format Microsoft created in 1985 specifically for storing icons in Windows. An ICO file is unique because it can contain multiple images at different sizes and color depths within a single file. This allows the operating system to select the most appropriate version of an icon depending on where it needs to be displayed.
The ICO format plays a critical role on the web as the traditional format for favicons, the small icons that appear in browser tabs, bookmark lists, and address bars. While modern browsers now accept PNG and SVG favicons, ICO remains the most universally compatible option, especially for older browsers and certain web crawlers.
A single ICO file typically contains icon images at sizes like 16x16, 32x32, 48x48, and 256x256 pixels. The smaller sizes often use uncompressed bitmap data for fast rendering, while the 256x256 size commonly uses PNG compression to keep file sizes reasonable. This multi-resolution approach ensures icons look sharp in every context.
Every ICO file starts with a 6-byte ICONDIR header. The first 4 bytes are always 00 00 01 00 — two reserved zero bytes, then 01 00 identifying the file as an icon (cursor files use 02 00 instead). Bytes 5-6 store the number of images in the file as a little-endian 16-bit integer. A favicon with 4 sizes (16x16, 32x32, 48x48, 256x256) would have 04 00 here.
After the ICONDIR header, each image gets a 16-byte ICONDIRENTRY describing it. The first byte is width (0 means 256), second is height (also 0 for 256), third is the color palette count (0 for 256+ colors). Then there's a reserved byte, followed by color planes (2 bytes), bits per pixel (2 bytes), image data size (4 bytes), and the offset to the actual image data within the file (4 bytes). This directory structure lets software jump directly to the size it needs.
For images smaller than 256x256, ICO traditionally stores them as BMP data — but with a twist. The data skips the 14-byte BITMAPFILEHEADER that normal BMP files have, starting directly with the BITMAPINFOHEADER. The biHeight field is doubled (e.g., 64 instead of 32 for a 32x32 icon) because it includes both the XOR mask (the actual image) and the AND mask (a 1-bit transparency mask). This BMP-without-header approach dates back to Windows 3.0.
Starting with Windows Vista, ICO files can embed raw PNG data for the 256x256 size. The format detector checks the first 8 bytes of each image's data: if they match the PNG signature (89 50 4E 47 0D 0A 1A 0A), the data is treated as a complete PNG file. This keeps large icon sizes compressed — a 256x256 32-bit BMP would be about 264KB uncompressed, while the PNG version is typically 10-30KB.
Technical specifications
| Full name | ICO (Windows Icon) |
| File extensions | .ico |
| MIME type | image/x-icon |
| Compression | Uncompressed bitmap or embedded PNG |
| Color depth | Up to 32-bit with alpha channel |
| Transparency | Yes |
| Animation | No (animated cursors use the separate .ani format) |
| Max dimensions | 256 × 256 pixels per icon image |
| Metadata | Icon directory header with size and color information |
| Year released | 1985 |
When to use ICO
- Website favicons for maximum browser and platform compatibility
- Windows desktop application icons
- Windows taskbar and Start menu shortcuts
- Legacy systems that require the ICO format specifically
- Multi-resolution icon packages for operating system integration
Pros and cons
Advantages
- Stores multiple icon sizes and color depths in a single file
- Universal favicon support across all browsers including legacy versions
- Native format for Windows application and system icons
- 32-bit color with full alpha transparency support
- Compact file sizes suitable for web delivery
Disadvantages
- Maximum individual image size limited to 256 by 256 pixels
- Not suitable for general-purpose image storage or photography
- Creating multi-size ICO files requires specialized tools
- Limited to icon use cases with no support for general graphics
- macOS uses its own ICNS format, requiring separate icon files for cross-platform applications
Compatibility
ICO files are universally supported by all web browsers for favicons and natively by Windows for system icons. macOS and Linux can display ICO files but use their own native formats. Most image editors can open ICO files though not all can create them.
ICO vs other formats
- ICO vs PNG
- PNG can serve as a favicon in modern browsers and offers broader use as a general image format. ICO uniquely bundles multiple sizes into one file and has superior compatibility with older browsers. For maximum favicon reliability, ICO remains the safest choice.
- ICO vs SVG
- SVG favicons scale perfectly to any size and are supported by most modern browsers. ICO provides better compatibility with older browsers and Windows system integration. A common approach is to provide both SVG and ICO favicons for complete coverage.
- ICO vs ICNS
- ICNS is Apple's equivalent icon format for macOS, supporting higher resolutions up to 1024 by 1024 pixels. ICO is limited to 256 pixels but dominates on Windows and the web. Cross-platform applications typically need both formats for full operating system integration.
ICO tools on My File Tool
Convert ICO files to PNG, JPEG, or other formats, or create ICO favicons from existing images. No software installation needed. First file always free.
Frequently asked questions
- How do I create a favicon for my website?
- Upload a square image (ideally 256x256 pixels or larger) to My File Tool and convert it to ICO format. Place the resulting favicon.ico file in your website's root directory for automatic browser detection.
- What sizes should an ICO favicon contain?
- A good favicon ICO file should include 16x16, 32x32, and 48x48 pixel versions at minimum. Adding a 256x256 version ensures crisp display on high-resolution screens and in Windows Explorer large icon views.
- Can I use PNG instead of ICO for favicons?
- Modern browsers support PNG favicons, but some older browsers and certain web crawlers only recognize ICO. For maximum compatibility, use an ICO file named favicon.ico in your site root alongside any PNG favicon declarations.
- Why does my ICO file contain multiple images?
- ICO files bundle multiple icon sizes so the operating system or browser can choose the best version for each display context. A 16x16 version appears in browser tabs while a 48x48 version appears in Windows shortcuts.
- What is the maximum size for an ICO image?
- Each individual image within an ICO file can be up to 256 by 256 pixels. For larger icon needs, Windows uses PNG files directly. The 256x256 size within ICO files typically uses PNG compression internally.
- What is the minimum valid ICO file structure?
- The smallest valid ICO file needs a 6-byte ICONDIR header (00 00 01 00 01 00), one 16-byte ICONDIRENTRY, and the image data itself. For a 1x1 pixel 32-bit icon using BMP format, that's 6 + 16 + 40 (BITMAPINFOHEADER) + 4 (1 pixel BGRA) + 4 (AND mask row padded to 4 bytes) = 70 bytes total. In practice, a usable 16x16 favicon with PNG compression is around 200-400 bytes.
- How does ICO store transparency?
- ICO uses two methods. For BMP-based icons, there's a 1-bit AND mask that defines which pixels are transparent. For 32-bit BMP icons, the alpha channel in BGRA pixel data provides smooth per-pixel transparency. PNG-embedded icons (256x256) use PNG's native alpha channel. Modern icons should use 32-bit color with alpha for the best results.
- Can an ICO file contain PNG images?
- Yes. Since Windows Vista, ICO files can store images as embedded PNG data instead of BMP. This is standard practice for the 256x256 size, where PNG compression reduces a 260KB uncompressed bitmap to 10-30KB. The format is auto-detected by checking if the image data starts with the PNG magic bytes (89 50 4E 47).
Other format guides
Need to convert ICO?
Extract icons from ICO files or create favicons from your images. Quick browser-based conversion with no software required.
Convert ICO now