What Is an ICO File?

Updated July 27, 2026

An .ico file is a container format built specifically for icons — most commonly a website’s favicon or a Windows application’s desktop icon. It looks like a single file, but it can hold several versions of the same image at different sizes, so the operating system or browser can pick whichever fits the space it needs.

How it’s different from a PNG or JPG

A PNG or JPG holds exactly one image at one resolution. An ICO can hold several — say 16×16, 32×32, and 48×48 — bundled together. When Windows Explorer needs a small icon for a list view and a larger one for a desktop shortcut, it reads both sizes out of the same ICO file rather than needing two separate images.

Modern ICO files — the kind every current browser expects — embed standard PNG-compressed image data internally, rather than the older uncompressed bitmap format. That’s good news: an ICO with embedded PNGs is really just “several PNGs packed into one file with a small index at the front,” not an exotic proprietary format.

What’s actually inside

The structure is simple enough to describe in a paragraph. A 6-byte header records how many images the file contains. Then comes a directory: one 16-byte entry per image, each recording that image’s width, height, colour depth, byte size, and where in the file its data begins. After the directory, the image payloads sit back to back — each either a PNG or a bitmap.

That’s the whole format. It explains both its strength and its limits: adding a size means appending another directory entry and another payload, and because width and height are stored as single bytes, 256×256 is the maximum — encoded as 0, since 256 doesn’t fit in a byte.

Why it survived

ICO dates to Windows 1.0 in 1985, which makes it older than the web. It persists for one reason: browsers request /favicon.ico from a site’s root whether or not you reference it in your markup.

That single default behaviour has kept a 1980s Microsoft format as a de facto web standard for four decades. Even sites shipping modern SVG and PNG icons still put an .ico at the root, because the request arrives regardless and a 404 in the logs is untidy.

Do you actually need one?

For a favicon — yes, in the sense that favicon.ico is still the file browsers look for by default at your site root, and it’s the one format guaranteed to work in older browsers with no extra <link> tag. Modern setups also add PNG and SVG favicon links (see our favicon sizes guide), but the ICO remains the universal fallback.

For anything else — app icons inside an installer, Windows executable icons — ICO is typically a hard requirement of the platform’s build tooling, not a choice.

Outside those two cases, you almost certainly want a PNG or SVG. ICO offers nothing useful for a general-purpose image: no better compression, no wider support, and a hard size ceiling.

Which sizes to put inside

Don’t bundle everything you can. Each embedded size adds bytes to a file every visitor downloads, and most of the historically recommended sizes target software that no longer exists.

For a web favicon, 16×16 and 32×32 cover essentially every case — the standard tab and the high-DPI tab. Add 48×48 if you care about Windows site shortcuts. Skip the rest; the larger sizes people sometimes bundle out of caution are better served by standalone PNGs referenced from your manifest, since those are only fetched when actually needed.

For a Windows application icon the calculus differs — desktop and Start menu contexts genuinely use larger sizes, and 256×256 belongs in the file.

Common problems

Renaming a PNG to .ico doesn’t work. Some browsers are forgiving enough to sniff the content and render it anyway, which makes this look like it works — until you hit software that reads the header, finds no ICO directory, and shows nothing. The file has to actually be an ICO.

Your icon is cached far past a normal refresh. Browsers hold onto favicons aggressively, and a hard reload often doesn’t clear them. Test in a private window before concluding your new icon is broken.

Detail vanishes at 16×16. A logo that reads clearly at full size frequently turns to mush in a browser tab. If your mark has fine strokes or small text, make a simplified variant for the small sizes rather than scaling the full logo down.

Transparency needs a 32-bit source. Starting from a source without an alpha channel gives an icon with an opaque box around it, which looks obviously wrong against a dark browser theme.

Working with ICO files

Going from a PNG to a favicon-ready ICO, with every size bundled correctly, is what PNG to ICO is built for — it also generates the extra PNG sizes and a web manifest that modern devices expect alongside the ICO itself. Start from the largest square source you have; downscaling produces clean small sizes, while upscaling a small source just magnifies its blur.

Going the other direction — you have an .ico and need a normal image out of it — ICO to PNG and ICO to JPG extract the largest embedded image. Prefer PNG here: JPG has no transparency, so an icon with a transparent background will come out on a solid block. If you need it as an SVG wrapper instead, for embedding in contexts expecting vector markup, ICO to SVG handles that — though note this wraps the existing pixels rather than tracing them into true vector paths, which no automatic conversion does well.

Share