You need a website's icon for a slide, a bookmarks page or a documentation screenshot, and the only file you have is favicon.ico. Or you are updating an old Windows application and the designer's source files are long gone, leaving just a .ico in the resources folder. Most image editors either refuse the file or open only one of the pictures inside it.
That last detail surprises people: an ICO file is not one image but a small collection. This guide explains how the format is organised, why it holds multiple sizes and colour depths, how to extract every image as a PNG, and what to do with the results.
What is inside an ICO file
The ICO format comes from Windows, which needed icons at several sizes for different views (small in lists, larger on the desktop) and, historically, at several colour depths for different displays. Rather than shipping a separate file for each, one .ico bundles them.
The structure is straightforward:
- A 6-byte header that says "this is an icon" (or a cursor) and how many images follow.
- A directory: one 16-byte entry per image, recording its width, height, colour depth and where its data starts in the file. A width or height of 0 in the directory means 256 pixels, the largest size the classic format describes.
- The image data for each entry, stored in one of two ways:
- Classic bitmap (BMP/DIB) data with an extra 1-bit "AND mask" that marks transparent pixels. Older icons use this, at depths from 1-bit monochrome to 32-bit with alpha.
- A complete PNG file embedded as-is. Windows Vista introduced support for this, and it is now common for 256 × 256 entries because it is far smaller.
What about CUR files?
Windows cursor files (.cur) use the same structure with one addition: each image records a hotspot, the exact pixel that acts as the pointer's tip. The images themselves can be extracted in the same way.
Typical sizes you will find
| Size | Common use |
|---|---|
| 16 × 16 | Browser tabs, small list views |
| 24 × 24 | Toolbars |
| 32 × 32 | Desktop icons at standard scaling, taskbar |
| 48 × 48 | Larger Explorer views |
| 64, 128 × 128 | High-DPI displays |
| 256 × 256 | Large icon views, high-resolution displays |
A website favicon.ico often contains 16, 32 and 48 pixel images. A Windows application icon may contain a dozen images at different sizes and depths.
Extract the images with our tool
The ICO to PNG converter reads the icon structure itself, in your browser, and saves every entry as a separate PNG.
- Open ICO to PNG and drop one or more
.icoor.curfiles onto the upload area, or click to choose them. - The tool reports how many images it found in each file. Each one appears as a tile with its pixel size, colour depth, whether it was a PNG entry or BMP entry, and its size in bytes. Small sizes are previewed with sharp, unblurred pixels so you can inspect them.
- Click PNG under a tile to download that size. Transparent areas are kept.
- Click Download all PNGs (ZIP) to get every image from every icon you added.
- Use Start over to clear the list.
If a file is really a PNG that someone renamed to .ico, the tool tells you so; just open it as a PNG. Rare icons that use compressed bitmap data inside entries are reported as unsupported.
Other ways to get PNGs from an icon
Image editors
GIMP opens ICO files and shows each image as a separate layer, which you can export individually. Some other editors only open the largest or the first image, so check the dimensions you get.
Command line
magick favicon.ico favicon-%d.png
ImageMagick writes one PNG per image in the icon, numbered in the order they appear. Use magick identify favicon.ico first to list the sizes.
Extracting icons from programs
On Windows, application icons live inside .exe and .dll files as resources. Specialist resource viewers can save them out as .ico files, which you can then convert. Respect the software's licence when reusing its artwork.
Getting a website's favicon
Most sites serve their icon at /favicon.ico on their domain, and many also list larger PNG icons in the page's <head> (look for rel="icon" and rel="apple-touch-icon"). The PNG versions are often larger and better quality than anything in the ICO. As with any logo, check you have permission before using a brand's icon in your own material.
Tips and pitfalls
Pick the right size, do not scale up
Always use the largest entry that is at least as big as you need, and scale down if necessary. Scaling a 32-pixel icon up to 256 pixels makes it blurry and blocky.
Designers often tune small sizes by hand
Good icon sets have hand-adjusted 16 and 32 pixel versions that are simplified, not merely shrunk. If you need a small icon, the matching small entry usually looks better than a scaled-down large one.
Old 1-bit and 4-bit entries
Very old icons may include low-colour images for displays that no longer exist. They are usually of no use today; the 32-bit entries are the ones to keep.
Making a new icon from the result
To rebuild an icon with a different set of sizes, feed the largest PNG into PNG to ICO. For a complete website icon set, including Apple and Android sizes, use the Favicon Generator. If the extracted PNG is too small for a new use, the Image Upscaler can help, within limits.
Embedding a small icon in code
For a tiny icon in HTML or CSS, the PNG can be turned into a data URI with Image to Base64.
Frequently asked questions
Why does my ICO file contain several images?
ICO files bundle the same icon at different sizes, and sometimes different colour depths, so Windows and browsers can pick the best version for each context without resizing.
What is the largest size an ICO file can hold?
The classic ICO directory describes images up to 256 × 256 pixels, which is the largest size normally used in icon files.
Will the PNGs keep a transparent background?
Yes. Transparency from 32-bit entries and from the transparency mask of older entries is carried into the PNGs.
Can I convert a .cur cursor file?
Yes. Cursor files use the same structure as icons, so each image inside is extracted as a PNG. The hotspot position is not part of the PNG.
Why does my ICO file fail to open?
It may be damaged, may be a different file type renamed to .ico, or may use a rare compressed bitmap encoding. Try opening it in an image editor, or ask for the original PNG or SVG artwork.