To fix a corrupt ICO, first rule out a stale icon cache, then try a fresh copy of the file, and if that fails rebuild the icon from its original source image. Damaged bytes cannot be repaired in place. The Univik ICO Converter rebuilds a clean .ico from a good source image.
A corrupt icon rarely announces itself. The file sits there looking normal, then refuses to open, shows blank or drops out of a build with an error. Before you try to fix anything, it pays to work out which of two very different problems you actually have.
Here is how to tell a damaged file from a system side glitch, what tends to break an ICO and the honest set of ways to get a working icon back.
Two Different Broken Icon Problems
The word corrupt gets used for two things that need opposite fixes. One is a damaged .ico file, a single file whose bytes are wrong. The other is a stale icon cache, where the files are fine but Windows is drawing them from an out of date store.
If your icons are wrong everywhere at once, the store is the culprit, and rebuilding the icon cache is the answer. Where Windows keeps that cache and how it works is covered in the guide on where Windows stores icons. The rest of this page is about a single bad file.
What Actually Corrupts an ICO
An ICO is a container, laid out on the ICO file page, with a header, a small directory and the image data. Corruption means one of those parts no longer matches the rest, so a reader trips partway through. A few everyday events cause it.
A buggy exporter can also write a file that was broken from the start, with entry offsets that point to the wrong place. A valid ICO follows a set layout, laid out in the ICO format reference, and any drift from it is what a reader chokes on.
How a Corrupt ICO Shows Up
The signs are consistent once you know them. The file will not open in an image tool or opens to a blank. A viewer shows no sizes or lists sizes that fail to render. In a build, an icon step throws an error like a failure to read or extract the icon.
A telling case is when one size shows but others do not. That points to partial damage, where the directory and one image survived while the rest of the data was lost. It is the difference between a file that is entirely gone and one you can still salvage part of.
Check Whether It Is Really Corrupt
Two quick checks settle it. First, look at the file size. A value of zero or only a few bytes means the file never finished writing and there is nothing to recover from it. Second, open the file in an ICO viewer and read what it reports.
A healthy file names its sizes and draws each one. A corrupt file shows nothing, errors or is missing entries it should have. The free ICO viewer lists what is inside a file, which tells you in seconds whether anything is left to work with.
Try a Clean Copy First
The fastest fix is also the dullest. If the icon came from a download, a repository or a colleague, fetch it again. A file damaged in transfer arrives whole the second time, and you are done.
If a tool keeps producing broken icons on your machine, look at what touches the file as it is written. Antivirus scanning the output folder mid build is a known troublemaker, and adding an exclusion for that folder clears it. Rule the easy causes out before assuming the icon itself is beyond help.
Salvage the Readable Sizes
When only part of a file is damaged, you can keep the part that survived. Open the file in the viewer, note which sizes still render and export those to a fresh image. From there a converter can pack them back into a new, valid ICO.
This will not bring back the sizes that were lost, so a partly salvaged icon may be missing its largest or smallest entry. That is acceptable for the moment, and you can add the missing sizes back once you locate a clean source.
Rebuild From the Source
The dependable fix is to stop treating the corrupt file as the source at all. Go back to the image the icon was made from, a PNG in most cases, and build a new ICO. The header and directory come out fresh and valid, so nothing carries over from the damaged file.
- Find the source Locate the PNG or image the icon was made from.
- Load it in the converter Add the image and pick the sizes you need.
- Export a clean ICO Write a fresh file with a valid header and directory.
- Swap it in Replace the corrupt file with the new one.
The Univik ICO Converter handles that rebuild, and the full walkthrough sits in the PNG to ICO guide. If the new file needs to carry clean transparency, how depth and the alpha channel work is set out in the guide on ICO color depth.
Turn the original image back into a valid multi size .ico with a fresh header and directory, leaving the corruption behind for good.
Free Download See All FeaturesWhen It Cannot Be Repaired
It helps to be clear about what repair means here. The bytes inside a file are not text you can patch by hand. Once they are scrambled or missing, there is no reliable way to reconstruct them, the same reason any damaged binary needs a backup rather than a fix, a point made under data corruption.
So the real recovery plan is the order above. A fresh copy if you can get one. A salvage of the readable sizes if you cannot. Then a rebuild from the source, the fix that leans on a clean file instead of the broken one. If the trouble was that a plain image had only been renamed to .ico, that is a separate case covered in the guide on a renamed PNG.
Frequently Asked Questions
How do I fix a corrupt ICO file?
Start with a fresh copy if the file came from somewhere. If it did not, open it in a viewer to see which sizes still read and export those again. The reliable fix is to rebuild the icon from its original source image.
What causes an ICO file to become corrupt?
The common causes are a transfer that stopped partway, a save that was interrupted or a program writing to the file at the same time. Antivirus tools and buggy exporters can also leave an icon with a broken header or wrong internal offsets.
Can a corrupt ICO be repaired?
The damaged bytes themselves cannot be reconstructed, so there is no true repair. What you can do is salvage the sizes that still read or rebuild the whole icon from a good source image. Rebuilding is the dependable route.
Why won't my ICO file open?
Either the file is corrupt, truncated so the data runs out early, or it was never a real ICO to begin with. Check the file size for a suspiciously tiny value and open it in a viewer to see if anything inside still reads.
My desktop icons look wrong, is the ICO corrupt?
That points to the icon cache, not a bad file. When icons across the whole system show wrong or blank, the cache is the cause rather than any one .ico. Rebuilding the icon cache fixes that, and it is a different job from repairing a file.
How do I know if an ICO is corrupt?
Open it in an ICO viewer. A healthy file lists its sizes and shows each one, while a corrupt file shows nothing, errors out or is missing sizes. A file size of zero or a few bytes is another clear sign.