What is the ICO file format?
Files with the .ico extension store image files used as icons for applications, documents, and folders in the Windows operating system. The format was developed by Microsoft and has been part of Windows since version 1.0.
Does an .ico file store a single scalable icon image?
Older versions of Windows used .ico files that contained a single 48×48 pixel icon image each. It was sufficient for the display requirements of that time. However, as higher-resolution computer monitors became more popular, single-sized icons were not sufficient and a more flexible solution was needed. Today, .ico files work as containers that store multiple images at different sizes - typically from 16×16 up to 256×256 pixels - so the operating system can pick the most suitable resolution for each context. Since Windows Vista, individual images inside the container may also be stored as compressed PNG data rather than raw BMP pixels, noticeably reducing file size at larger icon dimensions.
What kind of data do favicon.ico files contain?
.ico files are also used for storing website favicon images. Those are the icons displayed in the browser's tab and address bar, to the left of the site's address. Website favicons are saved in special favicon.ico files stored in the website's root folder, where browsers locate them automatically. A favicon.ico typically bundles images at multiple sizes - at minimum a 16×16 version - so different environments can pick the appropriate one. The closely related .cur format shares the same container structure but stores mouse cursors instead of icons.
Security & safety
RISK: LOWAn .ico is image data, not executable code, so a genuine icon file is safe to open in a viewer. Two cautions worth knowing: (1) historically there have been bugs in icon PARSERS - a malformed .ico has in the past been used to trigger crashes/exploits in Windows shell or image libraries, so keep your OS/viewer updated; (2) .ico is a common disguise for a misleading file (an executable renamed with an icon extension, or an .ico used as a decoy), so be wary of an 'icon' that arrived unexpectedly or asks to run. For favicons and folder icons from normal sources there is essentially no risk.
Format details
in a nutshell- Windows Cursor (.cur / .ani) - The cursor format is byte-for-byte almost the same container; it differs only by the type field (2 instead of 1) and adds hotspot coordinates.
Programs that open ICO files
Technical details
deep spec| Container structure | ICONDIR header followed by an array of ICONDIRENTRY records, each pointing to one embedded image block within the file |
| Magic bytes | 00 00 01 00 at file offset 0: two reserved zero bytes, then type field 01 00 identifying the file as an icon |
| Embedded image formats | Each entry holds either a Device-Independent Bitmap (DIB/BMP) or a complete PNG stream; format is detected by the entry's data size and PNG signature |
| Image size range | 1×1 up to 256×256 pixels per embedded image entry |
| Standard icon sizes | 16×16, 32×32, 48×48, 64×64, 128×128, and 256×256 pixels; Windows selects the best match at runtime |
| Supported bit depths | 1-bit (monochrome), 4-bit, 8-bit, 24-bit RGB, and 32-bit ARGB per individual entry |
| Alpha transparency | 32-bit entries carry an 8-bit per-pixel alpha channel; older lower-depth entries use a separate 1-bit AND mask for transparency |
| Maximum embedded images | Up to 65,535 entries per file, constrained by the 2-byte image-count field in the ICONDIR header |
| PNG-compressed entries | PNG data is permitted per entry since Windows Vista, substantially reducing file size for 256×256 images |
| MIME type | image/vnd.microsoft.icon |
| Cursor format variant | The .cur cursor format uses the identical container with type byte 02 00 and appends a hotspot coordinate to each entry |
| OS image selection | Windows automatically selects the closest-matching size and bit depth from the embedded set for each display context (shell, taskbar, title bar) |
| Shell resource embedding | Icons are frequently embedded inside .exe and .dll files as RT_ICON and RT_GROUP_ICON resources rather than stored as standalone .ico files |
| Favicon usage | Browsers fetch favicon.ico from a site's root directory; a single file can bundle multiple sizes for tabs, bookmarks, and home-screen shortcuts |
| Released | 1985 (Windows 1.0); PNG-compressed icons supported since Windows Vista, 2007 |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |
ICO conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about ICO files.