How to Create ICO Files from Images: Favicon & Icon Guide
Learn how to create ICO icon files from PNG, JPG, and SVG images. Covers multi-size ICO files, favicon creation, Windows application icons, and batch processing with detailed size and format specifications.
Michael Rodriguez·February 19, 2026·11 min read
What Is the ICO Format and Why Does It Still Matter?
The ICO (Icon) format was created by Microsoft for Windows application icons, and it became the standard favicon format for the web when Internet Explorer first supported favicon.ico in 1999. Despite being decades old, ICO remains relevant in 2026 for two specific reasons:
Legacy browser compatibility -- Some environments still look for favicon.ico at the root of a website
Windows application icons -- Desktop applications, taskbar pins, and Start menu shortcuts require ICO files
What makes ICO unique among image formats is its ability to contain multiple images of different sizes in a single file. A properly made ICO file bundles 16x16, 32x32, and 48x48 versions together, allowing the operating system to select the appropriate size for each context -- browser tabs use 16x16, the Windows taskbar uses 32x32, and the desktop shows 48x48 or larger.
This guide covers how to create ICO files from any source image (PNG, JPG, SVG), with specific focus on multi-size ICO creation, favicon implementation, and Windows application icon requirements.
For the broader picture of favicon implementation including PNG, SVG, and Apple touch icons, see our comprehensive how to create a favicon guide.
ICO file containing multiple icon sizes shown at different display contexts
Different contexts display icons at different sizes. A complete ICO file should contain multiple sizes:
Size (pixels)
Where It Appears
Required?
16x16
Browser tabs, address bar, bookmarks bar
Yes (essential)
24x24
Windows taskbar (small icons mode)
Optional
32x32
Windows taskbar (normal), browser tab on HiDPI
Yes (essential)
48x48
Windows desktop, Explorer details pane
Yes (recommended)
64x64
Windows Vista+ medium icons
Optional
128x128
Windows Vista+ large icons
Optional
256x256
Windows Vista+ extra large icons, Windows 10/11 Start
Recommended for apps
Minimum ICO for Web Favicons
For a website favicon, include at minimum:
16x16 -- Standard browser tab icon
32x32 -- Retina/HiDPI browser tab, Windows taskbar
48x48 -- Windows site pinning
Full ICO for Windows Applications
For Windows desktop applications, include all sizes from 16x16 through 256x256. The 256x256 layer should use PNG compression (supported since Windows Vista) to keep the file size manageable.
Upload your source image (PNG, JPG, SVG, or any supported format)
The converter automatically generates multi-size ICO output
Download the ICO file
For creating complete favicon sets (ICO + PNG + SVG + Apple touch icon), the image converter can produce all the required sizes and formats from a single source image.
Method 2: ImageMagick (Multi-Size ICO)
ImageMagick can create multi-size ICO files from any source image:
Pro Tip: Start with the largest, highest-quality source image you have. Downscaling from 512x512 or larger to 16x16 produces much sharper results than upscaling from a small image. If your logo exists as an SVG, always use that as the source -- it will produce the sharpest result at every size.
Source image at different ICO sizes showing quality at 16x16, 32x32, 48x48, and 256x256
Method 3: Python (Pillow)
from PIL import Image
def create_ico(source_path, output_path, sizes=None):
"""Create a multi-size ICO from a source image."""
if sizes is None:
sizes = [(16, 16), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)]
with Image.open(source_path) as img:
# Ensure RGBA for transparency support
img = img.convert("RGBA")
img.save(output_path, format="ICO", sizes=sizes)
# Create favicon with standard web sizes
create_ico("logo.png", "favicon.ico", [(16, 16), (32, 32), (48, 48)])
# Create Windows application icon with all sizes
create_ico("logo.png", "app.ico",
[(16, 16), (24, 24), (32, 32), (48, 48),
(64, 64), (128, 128), (256, 256)])
Batch ICO Creation
import os
import glob
def batch_create_icons(input_dir, output_dir, sizes=None):
"""Create ICO files from all PNG/JPG images in a directory."""
os.makedirs(output_dir, exist_ok=True)
for img_path in glob.glob(os.path.join(input_dir, "*.png")):
filename = os.path.splitext(os.path.basename(img_path))[0]
output_path = os.path.join(output_dir, f"{filename}.ico")
create_ico(img_path, output_path, sizes)
print(f"Created: {output_path}")
batch_create_icons("./logos", "./icons")
Method 4: Using png2ico (Lightweight CLI Tool)
png2ico is a dedicated tool for creating ICO files from PNG inputs:
# Install (varies by OS)
# macOS: brew install png2ico
# Ubuntu: apt install png2ico
# Create multi-size ICO from separate PNGs
png2ico favicon.ico icon-16.png icon-32.png icon-48.png
# If you only have one source image, resize first
magick source.png -resize 16x16 icon-16.png
magick source.png -resize 32x32 icon-32.png
magick source.png -resize 48x48 icon-48.png
png2ico favicon.ico icon-16.png icon-32.png icon-48.png
rm icon-16.png icon-32.png icon-48.png
Method 5: Using Sharp (Node.js)
For web applications that need to generate ICO files programmatically:
Pro Tip: Place favicon.ico at the root of your domain (https://yourdomain.com/favicon.ico). Browsers check this location automatically, even without a <link> tag. While modern browsers use the <link> tag for favicon discovery, some legacy browsers, crawlers, and bookmarking tools only check the root URL.
Creating Windows Application Icons
Windows application icons have stricter requirements than web favicons:
At 16x16 pixels, you have extremely limited space. Here are design strategies:
Use your logo mark, not the full logo -- The text portion of your logo will be unreadable at 16px. Use the icon/symbol only.
Maximize contrast -- At small sizes, low-contrast elements disappear. Use bold colors against transparent or contrasting backgrounds.
Simplify aggressively -- Remove fine details that collapse at small sizes. A simplified version at 16x16 often looks better than a scaled-down version of a detailed design.
Test at actual size -- View your icon at 16x16, 32x32, and 48x48 on a real screen (not zoomed in) to evaluate clarity.
Consider pixel hinting -- For the 16x16 and 32x32 versions, manually adjusting the design to align with the pixel grid produces noticeably sharper results than automated downscaling.
Design comparison showing detailed logo vs simplified favicon versions at multiple sizes
Converting Existing Favicons
If you need to update or extract an existing ICO file:
# Extract all sizes from an ICO file as separate PNGs
magick favicon.ico favicon-%d.png
# View what sizes are in an ICO file
magick identify favicon.ico
# Convert an old ICO to a modern ICO with additional sizes
magick old_favicon.ico[0] -resize 256x256 \
\( -clone 0 -resize 16x16 \) \
\( -clone 0 -resize 32x32 \) \
\( -clone 0 -resize 48x48 \) \
-delete 0 \
new_favicon.ico
Converting ICO to Other Formats
Sometimes you need to go the other direction:
ICO to PNG -- Use our PNG converter to extract the largest size from an ICO file
ICO to JPG -- Use our JPG converter for a raster version without transparency
ICO to SVG -- Use our PNG to SVG tool after extracting the PNG (note: this produces a traced vector, not a true vector conversion)
Troubleshooting
ICO File Not Showing in Browser
Clear browser cache (Ctrl + Shift + Delete)
Check that the file is at the correct path
Verify the <link> tag in your HTML head section
Test in an incognito/private window
ICO Appears Blurry
The source image was too small -- start with at least 256x256
The 16x16 version lacks pixel hinting -- consider hand-editing at this size
Creating ICO files requires understanding the multi-size container format and choosing appropriate sizes for your use case. For web favicons, include 16x16, 32x32, and 48x48. For Windows application icons, include all sizes up to 256x256. Start from the highest quality source image available -- ideally SVG or a large PNG. Use our ICO converter for quick conversions, ImageMagick for multi-size CLI creation, or Pillow/Sharp for programmatic generation in your build pipeline.