ICO to PNG Converter

Parses a .ico file's ICONDIR directory to find its largest embedded image, then extracts it: if that entry is already a raw PNG (common for modern 256x256 icons), the original PNG bytes are used unchanged; if it's a legacy device-independent bitmap, the pixels and 1-bit AND transparency mask are decoded directly. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

A Windows .ico file is really a small container of multiple image sizes bundled together, not a single image — useful for the OS, but awkward to reuse elsewhere.

This tool extracts the sharpest embedded image and hands it back as a standalone PNG.

What Is ICO to PNG Converter?

A byte-level ICO container parser: it reads the ICONDIR header and each ICONDIRENTRY to find the largest embedded image, then branches on whether that entry is a raw PNG (returned as-is) or a legacy DIB bitmap (decoded pixel-by-pixel, including its AND transparency mask).

No browser image-decoding API is used for the DIB path, since browsers don't natively understand the bitmap-inside-ICO format.

How ICO to PNG Converter Works

After validating the 6-byte ICONDIR header (reserved=0, type=1), the tool walks each 16-byte directory entry to compare width x height and keep the largest.

If that entry's data starts with the standard 8-byte PNG signature, it's returned unchanged; otherwise the tool reads the entry as a DIB (its own embedded header size, not assumed to be 40 bytes), decodes its 8/24/32-bit pixel data bottom-up, and combines it with the AND mask for transparency.

When To Use ICO to PNG Converter

Use it to pull a usable image out of an old favicon.ico or a Windows application icon file for editing, resizing, or reuse in a modern format.

It's also handy for inspecting what's actually inside an .ico someone handed you, since many icon files silently bundle multiple sizes and formats.

Features

Advantages

  • Runs entirely client-side; nothing you upload leaves the browser.
  • Automatically picks the largest, sharpest embedded image rather than making you guess which entry to use.
  • Passes through embedded PNG entries byte-for-byte instead of lossy re-encoding.

Limitations

  • Only the single largest embedded image is extracted; other sizes bundled in the same .ico are ignored.
  • 1-bit and 4-bit indexed icon bitmaps aren't supported (8-bit, 24-bit, and 32-bit are); cursor files (.cur) are also rejected since they use a different ICONDIR type value.

Examples

Modern 256x256 favicon.ico

Input

A .ico containing 16x16, 32x32, and 256x256 PNG-format entries

Output

The 256x256 entry's original PNG bytes, unchanged

Large modern icon entries are typically stored as real embedded PNGs, so extraction is lossless.

Classic 32x32 bitmap icon

Input

A single-size 32x32 32-bit DIB icon with an AND mask

Output

A 32x32 PNG with matching per-pixel transparency

The DIB decoder reconstructs true alpha from the bitmap data and mask.

Best Practices & Notes

Best Practices

  • If you need every size bundled in the .ico, note the tool only returns the largest — consider a dedicated multi-size ICO inspector if you need all of them.
  • Prefer 32-bit source icons when re-creating an .ico if you need per-pixel transparency to survive extraction.

Developer Notes

extractIcoImage is a pure function returning a tagged union (embedded-png bytes vs. a decoded PixelBuffer); the component decides how to turn either result into a paintable canvas, using createImageBitmap for the embedded-PNG case since that's real browser PNG decoding, not something worth hand-rolling.

ICO to PNG Converter Use Cases

  • Recovering a usable PNG from an old favicon.ico
  • Extracting a Windows application's icon artwork for reuse in documentation
  • Inspecting what image data an unfamiliar .ico file actually contains

Common Mistakes

  • Expecting all bundled sizes to be extracted at once — only the largest comes out.
  • Uploading a .cur cursor file, which uses a different ICO type field and is rejected.

Tips

  • If the extracted PNG looks blocky, the source .ico's largest entry may itself be small — check the icon's known sizes before relying on this for high-resolution artwork.
  • Use the PNG dimensions finder afterward to confirm exactly which entry size was extracted.

References

Frequently Asked Questions