Windows Icon (Legacy MIME)
image/x-icon
Released 1985
· by Microsoft Corporation
The image/x-icon MIME type represents the Windows Icon (ICO) format, developed by Microsoft in 1985. An ICO file is a container that bundles one or more images at multiple sizes and color depths, allowing the operating system to dynamically scale the icon depending on the display context (e.g., a 16x16 taskbar icon vs. a 256x256 desktop icon). While historically storing modified, uncompressed Windows Bitmaps (BMP), modern ICO files (since Windows Vista) can also encapsulate highly compressed PNG images. Though 'image/vnd.microsoft.icon' is the official IANA standard, 'image/x-icon' remains the heavily entrenched de facto standard used by web servers for favicons.
Technical Specifications
.ico
NoneDeflate (via PNG)
image/vnd.microsoft.iconimage/icoimage/icontext/icoapplication/ico
Magic Bytes & HTTP Headers
\x00\x00\x01\x00
Browser Support Matrix
| Browser | Status | Min Version |
|---|---|---|
|
|
Supported | 1 |
|
|
Supported | 1 |
|
|
Supported | 1 |
|
|
Supported | 12 |
|
|
Supported | Legacy |
Advantages & Limitations
- Universally supported by every web browser in existence for website favicons
- Packs multiple resolutions into a single file, eliminating the need to serve different files for the taskbar vs. the desktop
- Modern support for embedded PNGs (since Windows Vista) allows for excellent 32-bit transparency (alpha channels) and drastically reduced file sizes
- Internal file structure is convoluted due to decades of legacy cruft, such as the requirement for BMP data to lack a standard file header but double the height property for an archaic XOR/AND mask
- Larger file size compared to a single optimized PNG or SVG, as it literally stores the same image multiple times at different scales
- The MIME type landscape is highly fragmented (x-icon vs. vnd.microsoft.icon), causing occasional caching or strict-MIME validation errors on restrictive servers
Developer Code Snippets
File Detection Steps
How to programmatically detect a image/x-icon
file by reading its raw bytes:
- 1 Check the first 4 bytes. An ICO file always begins with the magic bytes 00 00 01 00.
- 2 The next two bytes (bytes 4 and 5) represent the number of images bundled within the file as a little-endian short integer.
- 3 Immediately following is the Icon Directory structure, where each 16-byte entry describes an embedded image's dimensions, color depth, size, and offset.
Software Support
ImageMagick
Conversion Tools
Share & Embed
[](https://freewebptojpg.com/mime/image/ico)
<iframe src="https://freewebptojpg.com/mime/image/ico/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="ICO Specs"></iframe>
JSON API
All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.
GET https://freewebptojpg.com/mime/image/ico.json
Open JSON
Frequently Asked Questions
What is the difference between image/x-icon and image/vnd.microsoft.icon?
Both represent the exact same .ico file format. 'image/vnd.microsoft.icon' was officially registered with IANA in 2003, making it the technical standard. However, 'image/x-icon' was used for over a decade prior and remains the most widely recognized MIME type by web servers and browsers for rendering favicons.
What is an ICO file?
An ICO file is a computer icon format used natively by Microsoft Windows and ubiquitously across the web as a 'favicon'. It acts as a container holding multiple versions of the same image at different sizes (like 16x16, 32x32, and 256x256) so it always looks sharp.
Should I still use .ico files for website favicons?
While a basic 'favicon.ico' placed in your website's root directory is an excellent fallback for older browsers and RSS readers, modern web development best practices recommend primarily using SVG or high-resolution PNG files for favicons, reserving the .ico format purely for legacy compatibility.