File Formats
What Is ICO? Icon Files and Favicons Explained
ICO is the Windows icon format that holds several sizes in one file. We explain its structure, the history of the favicon and which sizes you need today.
Author: Hemen Dönüştür Editör EkibiPublished: 8 min read

ICO is the format Windows uses for program and folder icons, and the web uses for the small site icon in a browser tab (the favicon). What sets it apart from other image formats is that a single file can hold several sizes of the same icon. This article explains the internal structure of an ICO file, how it evolved across Windows versions, the history of the favicon, which sizes you need today and how to produce ICO files correctly.
What is ICO?
ICO (extension .ico) is a container format Microsoft defined for icon resources. An ICO file starts with an "icon directory" that lists every image in the file (for example 16x16, 32x32 and 48x48 pixels) as a separate entry. Windows or the browser then picks the size that best fits where the icon is shown.
The official MIME type registered with IANA is image/vnd.microsoft.icon, but Microsoft software and many servers still use image/x-icon. The CUR format for mouse cursors is almost identical; it uses 2 instead of 1 in the directory's type field and stores the cursor's click point (hotspot).
History: from Windows icons to the favicon
- Windows 1.0: Icons were monochrome.
- Windows 3.0: The directory-based structure holding several images, as we know it today, arrived.
- 1995: John Hornick's Microsoft article "Icons" documented the ICO structure in detail and advised developers to include at least 16x16 (16 colors), 32x32 (16 colors) and 48x48 (256 colors) images.
- March 1999: Internet Explorer 5 became the first browser to support favicons. A
favicon.icofile in the site root was shown in favorites and the address bar. - Windows XP: An 8-bit alpha channel was added to 32-bit images, making soft, semi-transparent edges possible.
- Windows Vista: 256x256 images and PNG compression inside ICO were added.
- 2003: The
image/vnd.microsoft.iconMIME type was submitted to IANA by a third party.
Structure of an ICO file
Icon directory (ICONDIR)
The file starts with a 6-byte header: a reserved field (0), the type (1 for icons, 2 for cursors) and the number of images. A 16-byte directory entry follows for each image.
Directory entry (ICONDIRENTRY)
| Field | Meaning |
|---|---|
| bWidth, bHeight | Width and height (1 byte each). A value of 0 means 256 pixels. |
| bColorCount | Number of palette colors (0 for 8 bits and above) |
| wPlanes, wBitCount | Color planes and bits per pixel |
| dwBytesInRes | Size of the image data in bytes |
| dwImageOffset | Where the image data starts in the file |
Because the size fields are a single byte, an image inside an ICO can be at most 256x256 pixels.
Image data: BMP or PNG
In a classic ICO each image is a BMP without its file header (a DIB). According to Hornick's article it contains a color image (the XOR mask) followed by a 1-bit transparency mask (the AND mask), which is why the height stored in the header is the combined height of both masks, twice the real height. From Windows XP on, 32-bit images carry their alpha channel directly in the pixel data.
Since Windows Vista an entry can also be a complete PNG file instead of a BMP. Embedding PNG, especially for the 256x256 size, makes the file much smaller. MDN points out that PNG inside ICO was not supported before Vista and may cause trouble in old software, but current browsers and Windows versions read both kinds.
Which sizes do you need?
Windows app icons
Microsoft's current app icon guidance says a Win32 app should include at least 16x16, 24x24, 32x32, 48x48 and 256x256. If Windows finds no exact match it scales down the next larger size; with a 256-pixel image present, the icon is only ever scaled down, never up. At 100% scale, for example, the title bar and context menus use 16 pixels and the taskbar uses 24; at 200% those become 32 and 48.
Favicons for websites
The web works differently. Under the HTML Standard, if a page has no rel="icon" link, browsers may request /favicon.ico from the site root. Keeping a favicon.ico in the root is therefore still good practice, but it is not enough on its own:
- Google Search requires a square (1:1) favicon of at least 8x8 pixels and recommends one larger than 48x48 so it looks good on different surfaces.
- iPhone and iPad home screens use a 180x180
apple-touch-icon. - Android and PWAs expect 192 and 512 pixel icons in the web app manifest, plus a "maskable" version for adaptive icons.
- Current browsers also support SVG favicons; one vector file covers every size.
In practice, putting 16, 32 and 48 pixels inside favicon.ico covers desktop browsers and older systems, while larger sizes are supplied as separate PNG files.
Support across systems, browsers and software
Windows reads and writes ICO natively; Explorer, shortcuts and the desktop all work with it. According to MDN, Chrome, Edge, Firefox, Opera and Safari display ICO files. macOS uses its own ICNS format for app icons, but Preview opens ICO. Editors such as GIMP open an ICO as a layered file, one layer per size. MDN advises against ICO in general web content and notes that favicons have moved toward PNG with a <link> element.
Strengths and weaknesses
| Strengths | Weaknesses |
|---|---|
| Several sizes and color depths in one file | Maximum 256x256 pixels |
| Universal support on Windows | No use on the web beyond favicons |
| Alpha channel and PNG compression (Vista and later) | Old BMP-based entries are large and clunky |
| Browsers look for a root favicon.ico automatically | Needs a dedicated tool; not every program can write it |
Common problems and how to fix them
Isn't renaming a PNG to .ico enough?
Some browsers tolerate it, but it is not a real ICO: there is no icon directory and Windows will not accept it as an icon. The right way is to convert the image into a real ICO. Our PNG to ICO and JPG to ICO tools always write 16, 32 and 48 pixel squares and add 64, 128 and 256 when your image is large enough. Each size is embedded as PNG, so transparency is preserved.
The favicon is blurry or unreadable
Thin lines and small text vanish in 16 pixels. Use a bold, high-contrast, simple mark; if needed, take only the symbol part of your logo. A square source of at least 256x256, ideally 512x512 pixels, gives the best result.
A non-square image looks squashed or stretched
Icons are square. Our tools never stretch the image: they center it in a square with its proportions kept and leave the edges transparent. For a perfect square, cut a square section first with crop image.
The new favicon does not show up
Browsers cache favicons for a long time. Renaming the file or adding a version parameter (/favicon.ico?v=2), and checking that the server returns the right MIME type, usually fixes it. The icon in Google Search results updates only after the site is recrawled.
Windows still shows the old icon
Windows keeps icons in a separate cache. Rebuilding the app and recreating the shortcut, or signing out and back in, is often enough.
Conversion tips
- One ICO is not enough for a website: The favicon generator produces favicon.ico (16, 32 and 48 pixels), favicon-48x48.png, apple-touch-icon.png (180 pixels), icon-192.png, icon-512.png, a maskable icon-512-maskable.png and site.webmanifest in one go, plus icon.svg when the source is an SVG. It also gives you the snippet to paste into your page's
<head>. - The Apple icon needs an opaque background: iOS shows transparent areas as black and rounds the corners itself, so the favicon generator fills the apple-touch-icon with the background color you choose.
- If your logo is an SVG: render a large PNG with SVG to PNG and convert that to ICO, or give the SVG straight to the favicon generator.
Our ICO and favicon tools run in your browser; your image is not uploaded and never leaves your device.
Frequently Asked Questions
What is the maximum size of an ICO image?
The width and height fields in a directory entry are one byte each, and 0 means 256. So a single image inside an ICO is at most 256x256 pixels.
Should I use ICO or PNG for my favicon?
Use both. A root favicon.ico with 16, 32 and 48 pixels serves older browsers and automatic requests; declare PNG (and optionally SVG) icons with <link> tags for current browsers and mobile devices.
Does ICO support transparency?
Yes. Old ICOs use a 1-bit mask, 32-bit images have a full alpha channel since Windows XP, and embedded PNG has carried transparency since Vista.
How do I convert an ICO file to PNG?
Add your ICO to the image converter and choose PNG as the target. If the file contains several sizes, the largest one is used.
Are ICO files used on a Mac?
macOS uses the ICNS format for app icons. For websites, favicon.ico and PNG icons work in browsers on every operating system.


