Corrupted Files: Why They Happen and How to Fix a Corrupted File
You double-click a document and get “the file is corrupt and cannot be opened.” A photo opens half gray. A video plays for ten seconds and stops. A corrupted file is one whose contents no longer match the structure the program expects, so the app either refuses to open it or shows garbage. One bad file is usually a fixable nuisance. Many files going bad at once is a different situation, and it’s often the first sign that the drive underneath them is failing. This guide covers both.
How files become corrupted
A file is just a sequence of bytes stored in blocks on a disk. Corruption happens when some of those bytes are wrong, missing, or pointing to the wrong place. Common causes:
- Interrupted writes. A crash, power cut or forced shutdown while a file is being saved can leave it half written.
- Unsafe removal. Pulling a USB drive or SD card while data is still being written, especially on FAT32 or exFAT, can damage the file being copied or the file system itself.
- Bad sectors. When areas of a hard drive or flash memory become unreadable, any file stored there loses that piece. See bad sectors.
- A failing drive. Weak read/write heads, a degrading SSD or a faulty controller can return wrong or incomplete data.
- Faulty RAM. Memory errors can corrupt data as it’s being saved, so the file on disk is wrong even though the disk is fine.
- Sync conflicts. Cloud sync tools that upload a file while it’s open or edited on two devices can save a broken or conflicting copy.
- Malware and ransomware. Ransomware deliberately makes files unreadable. If filenames have a strange new extension, see ransomware file recovery.
- File system damage. If the structures that track where files live are damaged, files can show the wrong size, wrong contents, or vanish. See corrupted file system.
One corrupted file or many?
Before trying fixes, take stock. This decides what you should do next.
- One or two files, everything else fine: almost always a save or transfer problem. Use the repair steps below.
- Lots of files corrupting, especially older files you haven’t touched: that points to the storage itself. Files don’t change on their own. If they’re going bad while sitting on the disk, the disk is the likely suspect.
Other signs that point to the drive: Windows reports “data error (cyclic redundancy check),” copying stalls or fails partway, the PC freezes when opening certain folders, or a hard drive makes clicking or grinding noises.
If that sounds like your situation, skip ahead to “When corruption is a symptom of a failing drive.”
How to fix a corrupted file
Always work on a copy of the damaged file, and save repaired versions to a different location.
Word, Excel and PowerPoint: Open and Repair
Office has a built-in repair. In Word (Excel and PowerPoint are the same):
- Go to File → Open → Browse.
- Select the damaged file, but don’t double-click it.
- Click the small arrow next to the Open button and choose Open and Repair.
In Excel, if repair fails, the same menu offers Extract Data to pull out values and formulas. If the problem is a document you never saved, see recover unsaved Word and Excel documents.
Restore an earlier version
An older good copy often beats a repaired broken one.
- Previous Versions (Windows): right-click the file or its folder, choose Properties → Previous Versions. Versions appear only if File History or restore points were capturing that location.
- File History: search Start for Restore your files with File History and browse back to a date before the problem.
- OneDrive, Dropbox, Google Drive: most cloud services keep version history. In OneDrive on the web, right-click the file and choose Version history.
- Time Machine (Mac): open the folder in Finder, enter Time Machine, and step back to an earlier copy.
PDFs, photos and videos
- PDF: try opening it in a different reader (a browser, for example). Some readers tolerate errors others reject. Dedicated PDF repair utilities exist, with mixed results.
- JPEG and RAW photos: a different viewer may display a partially damaged image. Photo repair tools can sometimes rebuild headers. If the camera card is where the photos went bad, see recover deleted files from USB and SD cards.
- Video: players like VLC can often play past damaged sections. Video repair tools that use a healthy reference clip from the same camera can rebuild some broken MP4 and MOV files.
No repair tool can recreate data that isn’t there. If the file’s middle was never written, repair can only salvage what remains.
Windows system files
If Windows components themselves are corrupted (apps crash, updates fail), run these from an administrator Command Prompt:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
These repair Windows’ own files from known-good copies. They don’t fix your documents.
Rule out RAM
If files keep corrupting on a drive that tests healthy, test memory. Run mdsched.exe to open Windows Memory Diagnostic and let it check on restart.
When corruption is a symptom of a failing drive
If many files are corrupting at once, the most important thing is to stop using the drive. Every read on a failing disk can make it worse, and repair tools are the worst offenders.
- Don’t run CHKDSK or other file system repair tools on it. On a failing drive, they hammer weak areas and can “fix” the file system by discarding data. See Windows stuck repairing disk errors.
- Check the drive’s health with read-only tools, as explained in how to check hard drive health.
- Copy the most important files first, in small batches, to a different drive.
- If copying stalls or the drive makes noise, stop. The right next step is a sector-by-sector image made with tools that handle bad areas gently, then recovery from the image. That’s how labs work, and it’s the safest way to protect a failing drive.
The bottom line
A single corrupted file is usually the result of an interrupted save, unsafe removal or a sync glitch. Try the program’s repair option, restore a previous version, or use a format-specific repair tool, always on a copy. When many files are corrupting at once, the problem is almost certainly the drive. Stop repairs, back up what you can, and image the drive rather than running more tools on it.
If your drive is failing or the files you need won’t copy, our hard drive recovery service can help. ClearQuote recovers single devices for one flat $1,200 price with free prepaid shipping, and you pay nothing unless we recover your data.
