Convert PNG to ICO
Convert a PNG into a Windows ICO that carries 16, 32 and 48 pixel entries inside one file. An ICO is not an image format so much as a small archive holding several sizes of the same icon, and the operating system picks whichever it needs. Most converters ignore that and write a single image with an .ico extension, which is a PNG wearing the wrong name.
Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.
Add to Chrome — freeDrop your PNG file here, or click to browse
Up to 50 MB. Deleted automatically after 30 minutes.
What it does
- Three sizes in one file — 16, 32 and 48 pixels
- Transparency preserved in every entry
- Each size resampled from the source, not from a smaller copy
- PNG-compressed entries, not uncompressed bitmaps
How to use PNG to ICO
- 1
Start from a square PNG
A square source is what you want, ideally 256 pixels or larger. A non-square image is fitted rather than stretched, leaving transparent padding on the short edge — readable, but rarely what a designer intended, so crop it square first if you care.
- 2
Convert
Each of the three sizes is resampled directly from your original. That matters more than it sounds: downscaling 256 to 48 and then 48 to 16 compounds the softening, while going straight from the source each time does not.
- 3
Put it at the site root
Save it as favicon.ico in your site's root directory. Browsers request that exact path without being told to, which is why the file has kept the same name for thirty years.
How it works
The source PNG is resampled three times — to 16, 32 and 48 pixels — and each result is written as a complete PNG. Those three PNGs are then assembled into an ICO container: a six-byte header saying how many images follow, then a sixteen-byte directory entry per image recording its dimensions, color depth, byte length and offset, then the image data itself.
That is the entire format. An ICO has no compression of its own and no pixel data of its own; it is a table of contents in front of some files. Understanding that explains most of the confusion around it, including why a "single-size ICO" is technically valid and practically pointless.
Each size is resampled from your original rather than from the previously generated one. Chaining downscales is the common shortcut and it visibly softens the smallest entry, which is the one that matters most because it is the one in the browser tab.
Why not just rename a PNG
It nearly works, which is what makes it a trap. Browsers are forgiving enough that a PNG served at /favicon.ico often displays, so the mistake survives testing. Where it fails is everything else that reads the file: Windows shortcut icons, some feed readers, older browsers, and any tool that parses the ICO directory before decoding. Those see a malformed container and show nothing.
The other failure is quality. A renamed 512-pixel PNG forces every consumer to downscale it themselves, at whatever quality their renderer happens to offer, on every draw. Supplying a 16-pixel version you have looked at yourself is the entire point of the format.
Declaring it in your HTML
Dropping favicon.ico at the site root is enough on its own — browsers request that exact path whether or not you mention it. Declaring it explicitly is still worth doing, because it lets you control caching and stops a stale icon surviving a redesign:
<link rel="icon" href="/favicon.ico" sizes="any">
sizes="any" is the part people leave out. Without it, a browser that also
finds an SVG or PNG declaration has no way to know the ICO carries several
resolutions, and may pick the wrong one for the surface it is drawing.
A modern set is usually the ICO plus one larger PNG, each doing the job it is good at:
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.png" type="image/png" sizes="192x192">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
The ICO covers the browser tab and the Windows taskbar, where 16 and 32 pixels are what actually get drawn. The PNGs cover home-screen shortcuts and install prompts, which want something much larger. Neither replaces the other, which is why the thirty-year-old format is still in the list.
Designing for sixteen pixels
Sixteen pixels is 256 pixels in total, less than a single character of this sentence. Two things follow, and both are worth accepting before you generate anything.
Detail disappears completely. Gradients become flat color, thin strokes vanish or alias into gray, and text stops being text. The second example above is the common version of this: a wordmark that reads perfectly at 48 pixels and is unreadable at 16.
Contrast carries further than shape. An icon that is a dark form on a light field stays recognizable at any size; one built from two mid-tones will not. Look at your 16-pixel entry at actual size, next to a real tab bar, before shipping it — the preview at 400 percent is reassuring and tells you nothing.
Examples
A 512-pixel app icon
One file, three images inside it. The size is roughly the sum of three small PNGs plus a 22-byte directory header per entry, which is all an ICO's structure amounts to.
A detailed logo
The conversion is correct and the result is still unusable, which is worth saying plainly. Nothing with more than about two glyphs survives 16 pixels. Favicons that work are a single letter, a simple mark, or a solid shape — that is a design constraint, not a converter limitation.
Frequently asked questions
Why does an ICO contain several images?
Because the same icon is displayed at wildly different sizes and automatic downscaling produces mush at small ones. Windows uses 16 pixels in the title bar and 48 in Explorer; browsers ask for 16 in the tab and 32 for a bookmark. Shipping each size separately lets a designer sharpen the small ones by hand instead of letting the renderer guess.
Do I still need an ICO if I have a PNG favicon?
You need both, and for different reasons. Modern browsers prefer an SVG or PNG declared in a link tag, which is the one they will actually use. The ICO at the root is the fallback that older browsers and feed readers request blindly without reading your HTML, and it costs a few kilobytes to keep them working.
Which sizes are in the file this produces?
Sixteen, thirty-two and forty-eight pixels. Those are the three the operating system and browsers genuinely request. Some generators add 64, 128 and 256 as well, which inflates the file several times over for sizes that an ICO is essentially never asked for — a 256-pixel icon is served from a PNG or an app bundle, not from favicon.ico.
Does transparency survive?
Yes, in all three entries. Each one is stored as a PNG inside the ICO container rather than as a legacy bitmap with a separate mask, so the alpha channel is a real alpha channel with partial transparency, not the one-bit on-or-off cutout that older ICO files used.
Further reading
- A Three-Size Favicon Was 15 KB and the Same Images Were 1.3 KBA favicon is the smallest image on a website and one of the larger files in its root directory, which is a strange thing to be true. The reason is that .ico is not a compressed format at all, and every extra size you add costs its full uncompressed weight.
- Which Favicon Sizes You Actually NeedMost favicon guides list a dozen sizes and explain none of them. Only a few are ever actually drawn, the rest are cargo from an older web, and knowing which is which turns an afternoon of exporting into about five minutes.
- Cutting a Graphic to Sixteen Colors Saved Fourteen Per CentReducing the palette is standard advice for shrinking a PNG, and on a graphic that is already flat color it buys far less than the drastic-sounding change suggests. The reason is that PNG was already exploiting the same redundancy, and it had got there first.