Free webp to jpg
ICO

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.

Icons & UI Transparency Production Ready

Technical Specifications

MIME Type
image/x-icon
Extensions
.ico
Container
ICO Directory Structure
Compression
Uncompressed (DIB/BMP) & Deflate (Embedded PNG)
Algorithms
NoneDeflate (via PNG)
Color Depth
1-bit, 4-bit, 8-bit, 24-bit (True Color), 32-bit (RGBA)
Metadata
None
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/vnd.microsoft.iconimage/icoimage/icontext/icoapplication/ico

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
00 00 01 00
ASCII: \x00\x00\x01\x00
HTTP Headers
Content-Type: image/x-icon
Content-Type: image/vnd.microsoft.icon
HTML Accept Attribute
accept="image/x-icon, image/vnd.microsoft.icon, .ico"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Supported 1
Firefox Firefox
Supported 1
Safari Safari
Supported 1
Edge Edge
Supported 12
Internet Explorer Internet Explorer
Supported Legacy

Advantages & Limitations

Advantages
  • 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
Limitations
  • 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

import magic
# Libmagic natively detects the ICO magic bytes
print(magic.from_file('favicon.ico', mime=True)) # Outputs 'image/vnd.microsoft.icon' or 'image/x-icon'
const fs = require('fs');
// Manually detecting the ICO magic bytes (00 00 01 00)
const buffer = Buffer.alloc(4);
const fd = fs.openSync('favicon.ico', 'r');
fs.readSync(fd, buffer, 0, 4, 0);
fs.closeSync(fd);
const isICO = buffer[0] === 0x00 && buffer[1] === 0x00 && buffer[2] === 0x01 && buffer[3] === 0x00;
console.log('Is Windows ICO:', isICO);
import (
    "bytes"
    "net/http"
)
// Native Go HTTP detection reads the ICO magic bytes natively
// mime := http.DetectContentType(buf) // Returns "image/x-icon"
$mime = mime_content_type('favicon.ico');
echo $mime; // Standard setups will often resolve this to 'image/vnd.microsoft.icon' or 'image/x-icon'

File Detection Steps

How to programmatically detect a image/x-icon file by reading its raw bytes:

  1. 1 Check the first 4 bytes. An ICO file always begins with the magic bytes 00 00 01 00.
  2. 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. 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 ImageMagick
GIMP GIMP
A
Adobe Photoshop (Native in recent versions)
M
Microsoft Visual Studio

Conversion Tools

Share & Embed

Markdown Badge
ICO Format Badge
[![ICO Format](https://freewebptojpg.com/mime/image/ico/badge.svg)](https://freewebptojpg.com/mime/image/ico)
Interactive iframe Widget
<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
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

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.

Related Formats

Share this format