How to Repair Corrupted Files

How to repair corrupted files

File corruption happens when the data that makes up a file becomes damaged or altered in a way that prevents it from being read correctly by applications. Sometimes corruption is minor — a small glitch in the data that causes odd behavior but leaves the file mostly usable. Other times, it’s severe enough that the file refuses to open at all, showing errors like “The file is corrupt and cannot be opened.”

Corruption can affect any file type, from system files and documents to photos, videos, and archives. It’s often caused by abrupt interruptions during read/write operations, failing storage devices, malware, or even application crashes. While not every corrupted file can be fully recovered, many can be repaired with built-in Windows tools, application-specific recovery features, or third-party utilities.

This guide will explain what corruption is, why it happens, and walk through practical methods for repairing files and preventing the problem from recurring.


Understanding file corruption

What causes corruption?

Corruption typically happens when a file is being written or modified and something interrupts the process. For example:

  • Interrupted writes: A sudden power outage or system crash while saving a file can leave it incomplete.
  • Malware or ransomware: Malicious programs often modify or encrypt files, leaving them unreadable.
  • Bad sectors on storage devices: Over time, HDDs and SSDs can develop bad sectors that prevent files stored there from being read correctly.
  • Software bugs: Application crashes or incompatibility with file formats can cause files to be saved incorrectly.

Types of corruption

Not all corruption is equal.

  • Minor corruption: Small errors, like missing metadata or damaged headers, may still allow partial recovery. For instance, an image file might open but show distortion.
  • Severe corruption: Large portions of the file are missing, overwritten, or encrypted, making the file completely unusable. In these cases, backups or recovery tools are usually the only option.

Corruption at the file level affects only the file itself, but corruption at the system level — such as damaged Windows system files — can trigger application crashes or even prevent Windows from starting.

Common signs of corrupted files

File corruption doesn’t always announce itself the same way, but there are a few common symptoms that signal something has gone wrong. Recognizing these patterns helps you confirm whether the problem is file-related or caused by another issue like application errors.

Error messages when opening files
One of the clearest signs is a pop-up stating that the file is corrupt, unreadable, or incompatible. For example, Microsoft Office may display “The file is corrupt and cannot be opened,” while Windows might say “The file or directory is corrupted and unreadable.”

Applications crashing during file access
If programs consistently freeze or crash when you attempt to open a specific file, corruption is a likely culprit. This often occurs with large documents, spreadsheets, or multimedia files where damaged data prevents the application from processing the content.

Garbled or missing content
Partially corrupted files may still open but show signs of damage:

  • Text documents displaying unreadable characters or gibberish.
  • Images opening with missing sections, strange colors, or distortion.
  • Videos freezing at certain points, missing audio, or refusing to play beyond a damaged frame.

Unrecognized or mismatched file extensions
A corrupted file may lose its proper header information, causing Windows to misidentify its format. This can result in extensions not matching the file type, or the system reporting that no program is associated with the file.

Unexpected changes in file size
Files that suddenly balloon in size or shrink dramatically without reason may have been damaged. For instance, a Word document normally 200 KB suddenly showing as 0 KB is almost always corrupted beyond recovery.

Spotting these signs early gives you a better chance of repairing the file before the corruption spreads or the storage medium fails further.

Step-by-step troubleshooting and fixes

1. Check the file on another system or program

Before assuming the file is permanently damaged, test it in a different environment. Sometimes a file won’t open because of a program-specific issue, not actual corruption.

  • Try opening the file on another computer.
  • Use an alternate application that supports the same format. For example:
    • A .docx that fails in Microsoft Word might still open in LibreOffice or Google Docs.
    • A corrupted image may partially load in IrfanView or Paint.NET even if Photoshop rejects it.
  • If the file works elsewhere, the problem is likely with your software installation, not the file itself.

This quick check can save you hours of unnecessary troubleshooting if the corruption turns out to be program-related.

2. Restore from backup or File History

If the file is truly corrupted, the easiest solution is often to restore an earlier version.

  • Windows File History:
    1. Right-click the file.
    2. Select Restore previous versions.
    3. Choose an available version from the list and click Restore.
  • OneDrive/Google Drive/Dropbox: Cloud storage often keeps file version histories.
    • For OneDrive: Right-click the file online → Version history → Restore.
    • For Google Drive: Right-click → Manage versions → Download or restore an older copy.

Restoring from backup ensures you get a clean version of the file without needing specialized repair tools. If no backup exists, you’ll need to move on to more advanced fixes.

3. Use built-in Windows tools

If the corruption is tied to the file system or Windows itself, the OS includes utilities that can help:

  • CHKDSK (Check Disk): Repairs file system errors and bad sectors.
    1. Press Windows + S, type cmd, right-click Command Prompt → Run as administrator.
    2. Enter: chkdsk C: /f /r Replace C: with the affected drive letter. /f fixes errors, /r locates bad sectors.
    3. Restart to allow Windows to scan and repair.
  • System File Checker (SFC): Repairs corrupted or missing Windows system files. sfc /scannow This replaces damaged system files with clean copies from the Windows component store.
  • DISM (Deployment Imaging Service and Management): Repairs the Windows image if SFC alone can’t fix everything. DISM /Online /Cleanup-Image /RestoreHealth

These tools are especially effective if corruption affects system-related files rather than personal documents.

4. Try application-specific repair features

Many programs include built-in repair options for recovering their own file types:

  • Microsoft Office (Word, Excel, PowerPoint):
    1. Open the program.
    2. Go to File → Open.
    3. Select the corrupted document.
    4. Click the dropdown next to Open → choose Open and Repair.
      Office will attempt to rebuild the file and recover as much content as possible.
  • Adobe Acrobat (PDFs): While Acrobat itself has limited repair tools, some PDF editors can re-save or optimize damaged files. Opening the file in another PDF reader (like Foxit) may also salvage it.
  • Compressed archives (ZIP, RAR):
    • WinRAR has a Repair archive option that can reconstruct damaged ZIP or RAR files.
    • 7-Zip can sometimes extract undamaged parts of an archive even if the file is partially corrupted.
  • Multimedia files (videos, images):
    • Video players like VLC can rebuild damaged indexes in MP4/AVI files.
    • Photoshop may fail to open a corrupt image, but IrfanView or GIMP might still load enough to export the usable parts.

Application-level recovery is often the fastest way to regain access to corrupted documents without needing third-party repair utilities.

5. Use file recovery or repair utilities

If built-in and application-specific tools fail, third-party repair utilities can sometimes recover corrupted files by reconstructing missing or damaged data. Some well-known options include:

  • Stellar File Repair Toolkit – Specializes in repairing Office documents, PDFs, images, and video files.
  • EaseUS Data Recovery Wizard – Can recover deleted or corrupted files, including partially damaged ones, from HDDs and SSDs.
  • Disk Drill – Good for recovering lost or corrupted files from formatted drives or removable storage.
  • Open-source tools – Options like TestDisk and PhotoRec can restore corrupted partitions and recover files in raw format, though they’re less user-friendly.

These tools work best when corruption is partial rather than total. Severe corruption (like overwritten data) may be unrecoverable. We go over more tools in our Guide to the Best Data Recovery Software.

6. Extract usable data manually

If a file won’t repair, you may still be able to salvage parts of it:

  • Open in a text or hex editor: Even if the file type isn’t recognized, programs like Notepad++ or HxD can expose raw data. You may recover readable text, metadata, or image headers this way.
  • Change file extensions: Sometimes forcing an application to treat the file as a different type works. For instance, renaming a .docx to .zip allows you to extract embedded XML content manually.
  • Recovering multimedia content: Tools like VLC Media Player or FFmpeg can bypass damaged indexes in video files, letting you play or export usable sections. For images, GIMP or IrfanView may open files Photoshop can’t.
  • Partial extraction from archives: Even if a ZIP or RAR archive is corrupt, utilities like 7-Zip can often pull intact files from undamaged portions.

This method won’t restore the original file fully, but it can help save critical fragments instead of losing everything.

7. Repair or replace storage media

If file corruption is widespread — affecting multiple files across different formats — the issue may be with the storage device itself.

  • Check drive health: Use SMART monitoring tools like CrystalDiskInfo, or manufacturer utilities such as Samsung Magician (for SSDs) or WD Dashboard (for Western Digital drives). Warning signs include reallocated sectors, high error rates, or uncorrectable read errors.
  • Run CHKDSK with surface scan: chkdsk C: /r This scans for bad sectors and attempts to move data to healthy parts of the disk.
  • Replace failing drives: If SMART reports imminent failure, back up all accessible data immediately and replace the drive. Continued use risks permanent data loss.
  • Professional recovery: For critical data on a severely damaged drive, specialized labs (like Ontrack) may still retrieve files using forensic-level tools — though costs are often high.

In many cases, repairing or replacing the storage medium is the only long-term solution when corruption keeps recurring.

Preventing file corruption in the future

While it’s reassuring to know repair tools exist, the best defense against file corruption is to avoid it in the first place. The single most effective step you can take is to keep reliable backups. Whether you use Windows’ built-in File History, an external hard drive, or cloud services like OneDrive or Google Drive, having earlier versions available turns a crisis into a minor inconvenience.

Stable power is another key factor. Many cases of corruption occur when a system loses power in the middle of writing a file. A surge protector or, even better, an uninterruptible power supply (UPS) keeps your computer safe from brownouts, spikes, and unexpected shutoffs. Similarly, avoiding unsafe shutdowns and always ejecting removable drives properly reduces the risk of files being left in a half-written state.

Security also plays a role. Malware and ransomware remain common causes of corrupted or inaccessible files. Keeping your operating system patched and your antivirus software updated lowers the risk of malicious tampering. On the hardware side, aging storage devices should not be ignored. Checking drive health periodically with tools like CrystalDiskInfo or manufacturer dashboards lets you replace a drive before it becomes unreliable.

🤞 Your weekly tech expert, in your inbox.

Practical fixes, hidden tricks, and gear recommendations. No fluff, just what works.

We don’t spam! Read more in our privacy policy

Sign up to get your free Survival Kit

Don't miss out on weekly tech tips to your inbox. Join now to get your free survival kit with 21 of my best fixes.

We don’t spam! Read our privacy policy for more info.