ICO to PNG
Extract high-quality PNG images from ICO favicon files. Supports batch processing, transparency preservation, multiple size detection, and Retina upscaling. 100% private and local.
Upload Icon Files
Drag & drop .ICO / .CUR files here
or click to browse from device
No ICO Icon Loaded
Drag and drop a website favicon.ico, cursor.cur, or cursor files to analyze, extract embedded sub-resolutions, preview in real time, and download as transparent PNGs.
Complete Guide to ICO to PNG Conversion: Technical Structures, Web Standards, and Local Workflows
In modern web development and graphic design, managing image assets across different devices, platforms, and resolutions is a critical challenge. Among the standard image formats, the ICO (Icon) file format is one of the oldest yet most persistent, particularly due to its deep integration with Microsoft Windows and web browsers. However, as web ecosystems shift toward modern, lightweight, and versatile formats like PNG, WebP, and SVG, deconstructing and converting legacy ICO containers is a frequent necessity.
This guide provides a comprehensive, highly technical analysis of the ICO and PNG file formats, explores their inner binary structures, outlines the best practices for web favicon deployment, and details how our client-side ICO to PNG Conversion Studio extracts and upscaled these files securely.
1. What is the ICO File Format? A Deep Technical Analysis
The ICO file format is a dedicated graphic container format designed specifically for computer icons. First introduced in Windows 1.0, the format has undergone several evolutions, culminating in its current structure which has been stable since Windows Vista.
The defining characteristic of an ICO file is its ability to pack multiple sub-images of varying dimensions and color depths into a single file. This design solves a key user experience problem: a computer icon must look sharp whether it is displayed as a tiny 16x16 pixel thumbnail in a detailed list, a 32x32 icon in a browser tab, or a massive 256x256 asset on a high-definition desktop grid. By wrapping all these resolutions inside a single file container, the operating system or browser can automatically select and render the optimal size without relying on real-time scaling filters that cause pixel blur.
Standard Resolutions and Applications
A production-grade ICO file typically bundles the following standard resolutions:
- 16x16: The classic web favicon size. Used in browser tabs, address bars, and legacy desktop detail lists.
- 24x24: Used on Windows toolbar items and specialized mobile layouts.
- 32x32: Used for desktop shortcuts, file listings, and Retina web favicons.
- 48x48: Used for large desktop icons and file explorers.
- 64x64: Used for higher-density Explorer layouts and custom applications.
- 128x128: High-resolution application icons for Windows systems.
- 256x256: The modern maximum standard for desktop icons. Often compressed using PNG compression inside the ICO file to reduce file size.
- 512x512: A next-generation size occasionally found in custom application templates, though more common in Apple's
.icnsformat.
2. The Anatomy of an ICO File
To understand how our tool extracts PNGs from an ICO file, it is helpful to look at the binary structure of the file format. An ICO file consists of three main components:
- Header (Icon Directory): A 6-byte structure defining the format type and number of embedded images.
- Image Directory Entry (List of Entries): A series of 16-byte records providing metadata for each sub-image (dimensions, offsets, size).
- Image Data: The raw binary payloads of the images, which can be either BMP or PNG streams.
Binary Layout Table
Below is a map of the binary layout of a standard ICO file header and directory:
| Byte Offset | Data Type | Field Name | Description |
| :--- | :--- | :--- | :--- |
| 0 - 1 | uint16 | Reserved | Must always be 0. |
| 2 - 3 | uint16 | Type | Specifies format: 1 for ICO, 2 for CUR (cursor). |
| 4 - 5 | uint16 | Count | Number of sub-images packed inside the file. |
| 6 - 21 | 16-byte struct | Directory Entry 1 | Metadata for the first sub-image (width, height, offset). |
| 22 - 37 | 16-byte struct | Directory Entry 2 | Metadata for the second sub-image (if Count > 1). |
The 16-Byte Directory Entry Structure
For each image specified in the Count field, there is a corresponding 16-byte directory entry:
- Width (1 byte): Image width in pixels. A value of
0represents256pixels. - Height (1 byte): Image height in pixels. A value of
0represents256pixels. - Color Count (1 byte): Number of colors in the color table. Set to
0if the image doesn't use a palette. - Reserved (1 byte): Must always be
0. - Color Planes (2 bytes): Number of color planes. Usually set to
1or0. - Bits per Pixel (BPP) (2 bytes): The color depth. Common values are
4(16 colors),8(256 colors),24(True Color), or32(True Color with Alpha). - Size of Data (4 bytes): The total size of the image payload in bytes.
- Offset (4 bytes): The starting byte position of the image data from the beginning of the file.
BMP vs PNG Payloads
Older ICO files store image data using the BMP (Bitmap) format, specifically a headerless BITMAPINFOHEADER followed by the color table and pixel maps. Modern ICO files (especially those containing 256x256 icons) often embed a standard PNG file instead of a BMP to take advantage of PNG's superior compression.
Our client-side tool reads the offset and data size from the directory entries, jumps directly to the payload, and determines if it starts with the PNG magic number: \x89\x50\x4E\x47\x0D\x0A\x1A\x0A. If the signature is present, the sub-image is already a valid PNG, and the tool extracts the raw bytes directly. If it is a BMP, the tool parses the bitmap structure, creates an offscreen HTML5 <canvas>, draws the pixel map onto the canvas (resolving the transparency masks), and exports it as a PNG.
3. PNG vs ICO: A Technical Comparison
When deciding which format to use for your application assets, understanding the tradeoffs between PNG and ICO is essential:
1. File Type and Purpose
- ICO: A container format that packs multiple resolutions. It is designed to act as a single source of truth for applications and operating systems to fetch icons.
- PNG: A single-image format. It cannot contain multiple sub-images. Instead, it holds a single raster image.
2. Compression and File Size
- ICO: Legacy BMP payloads are uncompressed, leading to large file sizes. Modern PNG-compressed payloads fix this, but the file size is still the sum of all embedded images.
- PNG: Uses DEFLATE compression, making it highly optimized for web delivery.
3. Transparency Support
- ICO: Supports simple binary transparency via an AND bitmask. Modern 32-bit ICOs support alpha transparency, but older applications may fail to render it.
- PNG: Features native 8-bit alpha channel support, allowing 255 levels of transparency for every pixel. This enables smooth gradients, soft shadows, and anti-aliased rounded edges.
4. Compatibility
- ICO: Native to Windows and web browser favicons. Not supported by mobile platforms, Linux desktops, or standard design software.
- PNG: Universally supported by every modern operating system, web browser, mobile application, email client, and design tool.
4. The History of Web Favicons: From 16x16 to Responsive PWAs
The concept of a "favicon" was introduced in 1999 by Microsoft in Internet Explorer 5. If a user bookmarked a website, Internet Explorer would request a file named favicon.ico from the root directory of the server. If found, the icon was displayed next to the site name in the browser's Favorites menu.
Because this feature was not initially standardized, browsers would look for the file in the root directory even without any HTML tags. As a result, the favicon.ico file became a permanent fixture of web standards.
The Modern Multi-Device Challenge
Today, web applications are accessed on smartphones, tablets, high-DPI desktop displays, smart TVs, and desktop environments. A single 16x16 pixel icon is no longer sufficient.
- Apple iOS Devices: iPhones and iPads use the Apple Touch Icon (typically 180x180 pixels) to display icons when a user adds a website shortcut to their home screen.
- Android Devices: Android Chrome uses the Web App Manifest (
manifest.json) file to fetch high-resolution icons (typically 192x192 and 512x512 pixels) for Progressive Web Apps (PWA). - Search Engine Indexers: Google crawls website favicons to display next to search results. To ensure your icon is indexable, it must be a multiple of 48x48 pixels.
5. Implementing Favicons: Developer Deployment Guide
For modern web projects, deploying a clean, responsive icon system requires configuring several files. Here is the recommended layout for a production website:
Standard HTML Head Integration
Add the following tags to the <head> of your website to support both modern and legacy browsers:
<!-- Legacy fallback -->
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!-- Standard web favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="48x48" href="/favicon-48x48.png">
<!-- Apple iOS home screen icon -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<!-- Web App Manifest for PWAs -->
<link rel="manifest" href="/site.webmanifest">
The Web App Manifest (site.webmanifest)
For Progressive Web Apps, define your icon set in the manifest JSON file:
{
"name": "My Professional App",
"short_name": "ProApp",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#518231",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Next.js 15 Metadata API Configuration
If you are using Next.js 15 (App Router), place your icon files directly in the root of your /app directory:
/app/icon.png(used for standard favicons, Next.js generates the different sizes automatically)/app/apple-icon.png(used for Apple Touch Icons)/app/favicon.ico(fallback for older browsers)
Next.js will automatically scan these files and inject the correct <link> tags into your HTML headers at build time.
6. How to Extract PNGs from ICO Files (Client-Side implementation)
Our ICO to PNG Conversion Studio parses files locally in your browser using the following technical workflow:
- Binary Reading: The user uploads an ICO file. The file is read into RAM as a raw
ArrayBufferusing the HTML5FileReaderAPI. - Directory Parsing: The parser reads the 6-byte header to verify the file is a valid ICO format, then loops through the 16-byte directory entries to map out each sub-image.
- Payload Extraction:
- If a sub-image uses PNG compression, the parser extracts the raw byte range and creates a new
Blobwith the MIME typeimage/png. - If a sub-image uses the legacy BMP format, the parser reads the header parameters, color table, and pixel array, then draws them onto an offscreen canvas element pixel-by-pixel, preserving transparency masks.
- If a sub-image uses PNG compression, the parser extracts the raw byte range and creates a new
- Retina Upscaling: If the user selects upscaling (e.g. 2x or 3x), the tool creates a new canvas with multiplied dimensions, sets the scaling filter (
imageSmoothingEnabledtofalsefor nearest-neighbor scaling ortruefor smooth scaling), and redraws the image. - Local Download: The canvas is converted to a PNG blob using
canvas.toBlob(). If a single file is requested, the browser triggers a local download. If multiple files are processed,jszipcompiles them into a ZIP package entirely in memory.
This client-side architecture guarantees complete privacy—your files are never uploaded to any remote server.
How to Use ICO to PNG
Upload your ICO files by dragging and dropping them into the designated area or using the file browser.
Inspect the ICO Analyzer panel to view all available sizes, bit depth, and transparency info.
Choose your extraction mode (e.g., Extract All Sizes, Extract Selected, Largest, or Smallest).
Adjust export settings such as scale factor (1x to 4x Retina) and scale rendering filter (Smooth or Pixelated).
Toggle the Interactive Website Previews (Browser Tab, Bookmark, PWA) to verify visual alignment.
Click 'Download PNG' for individual sizes, or click 'Export All as ZIP' to download the entire set in one package.
Frequently Asked Questions
What is an ICO file?
What is a PNG file?
Why should I convert ICO to PNG?
How do I convert an ICO to a PNG for free?
Does converting ICO to PNG lose quality?
Can an ICO file store multiple sizes?
How does the browser choose which size to display from an ICO?
Does PNG preserve transparency?
Is my file uploaded to a server?
Can I convert multiple ICO files at once?
What is a favicon?
Can I use PNG directly as a favicon instead of ICO?
What is the standard favicon size?
Why do some old ICO files fail to convert?
What are CUR and ICNS files?
How do I make a favicon for my Next.js website?
What is Retina support in this tool?
How do I extract only the largest icon from an ICO?
How do I extract only the smallest icon from an ICO?
Can I download all extracted icon sizes in a single ZIP file?
What is the difference between 8-bit, 24-bit, and 32-bit icons?
What is an alpha channel in PNG?
Why does my icon have a black background instead of transparent?
How do I verify that transparency was preserved?
What is the difference between ICO and CUR formats?
Does this tool support CUR files?
How does this tool process files locally?
What technologies does this tool use?
Does this tool support mobile devices?
Can I use this tool offline?
What are the best practices for favicon design?
What is the Apple Touch Icon size?
What is the PWA icon size requirement?
How do I convert PNG back to ICO?
How many sizes can an ICO file contain?
Why is ICO still used if PNG is more modern?
What is a 32-bit color depth with alpha transparency?
Can I upscale a small icon size to a larger size?
Does upscaling make the image blurry?
How do I use the website previews?
What is the browser tab preview?
What is the mobile bookmark preview?
What is the PWA preview?
How does the Favicon Analysis work?
Why is my favicon not showing up in search results?
How does Google index website favicons?
How long does it take to convert an ICO to PNG locally?
Are there any hidden fees or limitations?
Do I need an account to use this tool?
What browsers are compatible with this tool?
Can I use this tool in automated scripts?
Does this tool support batch uploading of large ICO files?
Key Features
- Multi-size detection and extraction for all embedded ICO sub-images
- Batch processing support to convert multiple ICO files simultaneously
- Preserves alpha channel transparency and original image edges with zero compression artifacts
- Retina display exports at 1x, 2x, 3x, and 4x upscaling
- Four extraction modes: All Sizes, Selected Sizes, Largest Size, Smallest Size
- Live preview with browser tab mock, mobile bookmark mock, and search result preview
- Local ZIP export for batch downloads using JSZip
- Developer tools including Favicon Analysis, Browser Compatibility, and Next.js integration guidelines
- 100% client-side security—files are processed in your browser, never uploaded to any server
Common Use Cases
- Extracting source PNG files from an existing website favicon.ico for reuse
- Deconstructing legacy application icon sets to modernize asset directories
- Inspecting multi-resolution ICO files to ensure they contain correct sizes for deployment
- Generating Retina-ready high-dpi icon alternatives from standard desktop icon files
- Previewing how a favicon will look in real-world environments like browser tabs and home screens
- Converting batch icon libraries securely without leaking proprietary artwork to remote servers