File Repairer
Windows 10 & 11 Buy license · $29.95
Getting started

What Causes Files to Become Corrupted (and Can They Be Fixed?)

Interrupted saves, unplugged drives, dead camera batteries and failing storage: what really corrupts files, how to tell, and which damage can be repaired.

Updated 5 minute read The File Repairer team

Files become corrupted when the data on disk no longer matches the structure the program expects. The most common causes are a save or copy that was interrupted (a power cut, crash, or a USB drive pulled out too early), a failing hard drive, SSD or memory card, a download or transfer that did not finish, a recording cut off by a dead battery or full card, and software bugs or sync conflicts. Viruses can damage files too, but everyday interruptions cause far more corruption than malware does.

Knowing the cause matters, because it tells you whether the file can be repaired, whether you need to recover it first, and how to stop it happening again.

What "corrupted" actually means

Every file type has a structure. A Word .docx file is really a ZIP archive full of XML parts. A JPEG has a header that describes the image, followed by compressed picture data. An MP4 video has the footage itself plus an index (often called the moov atom) that tells a player where each frame and each piece of sound lives.

Corruption means some of those bytes are wrong, missing or out of place. Sometimes it is a tiny piece of the structure, and the rest of the content is perfectly intact. Sometimes the content itself is gone. That difference is why some corrupted files can be fully repaired and others only partly.

The most common causes of file corruption

CauseWhat happens to the fileTypical sign
Interrupted save (crash, power cut, forced restart)The program was halfway through writing the fileOffice says it found unreadable content, or the file is 0 KB
USB drive or card removed while writingData still in the write cache never reached the driveFiles copied last are the ones that won't open
Recording cut off (dead battery, full card)The camera never wrote the video's index at the endA large MP4 or MOV that will not play at all
Failing hard drive, SSD or memory cardSome sectors can no longer be read or return wrong dataGray areas in photos, CRC errors, slow or failing copies
Incomplete download or transferThe end of the file is missing"Unexpected end of archive", half-loaded images
Software bugs and add-insThe program writes invalid content into the fileA file that crashes one program but opens elsewhere
Cloud sync conflictsTwo copies overwrite or merge badlyDuplicate files with a PC name added, missing recent edits
MalwareFiles are damaged or encrypted on purposeMany files changed at once, often with a new extension

Interrupted saves

When you click Save, the program writes the whole file again. If Windows crashes, the laptop battery dies or the PC is switched off at the wall during that moment, you can end up with a file that is half new and half missing. Modern Office versions reduce the risk by writing to a temporary file first, but a crash at the wrong moment still causes damage, especially with large files on slow or network drives.

Removing drives too early

Windows does not always write data to a USB drive the instant a copy appears finished. If you unplug the drive before Windows has flushed everything, the most recently copied files are the ones most likely to be damaged. Using Safely Remove Hardware and Eject Media in the taskbar, or Eject in File Explorer, avoids this. The same applies to memory cards taken out of a camera that is still writing.

Recordings that stop suddenly

Phones, cameras, action cams, drones and dashcams write the video data as they record but usually write the index only when you press Stop. If the battery dies, the card fills up or the device overheats first, the footage is on the card but the index that makes it playable is missing. This is one of the most repairable kinds of corruption, because the picture and sound data are usually all there. See fixing a video cut off when the battery died.

Failing storage

Hard drives develop bad sectors, SSDs and memory cards wear out, and cheap or counterfeit cards can silently lose data. When part of a file sits on an unreadable area, that part comes back as garbage or zeros. In photos this often shows as a gray or striped bottom half. If you see errors across many files, stop using the drive and copy what you can, because it may get worse.

Incomplete downloads and transfers

A download that drops out, a ZIP copied over an unstable network, or an email attachment that was cut short ends up shorter than it should be. The fix is usually simple: download or copy it again from the source.

After data recovery

Files rescued from a deleted partition, a formatted card or a failing drive are often damaged, because recovery software can only rebuild what was still on the disk, and some files were fragmented or partly overwritten. Our guide on recovered files that won't open covers this in detail.

What corruption is not

Some errors look like corruption but have nothing wrong with the file:

  • A file with the wrong extension, for example an old .xls renamed to .xlsx.
  • A format your program does not support, such as an HEVC video on a PC without the right codec.
  • A file that is password-protected or encrypted.
  • A file blocked because it came from the internet, which Office opens in Protected View.
  • A OneDrive file that is still online-only and has not downloaded yet.

Rule these out first. Tools like File Repairer's Tools > Check Files for Damage help here, because they mark each file as Damaged or No damage found without changing anything.

Can a corrupted file be fixed?

It depends on what was damaged. If the structure is broken but the content survived, as with a missing video index, broken XML inside a Word file or a damaged ZIP directory, the file can often be rebuilt in full. If part of the content was overwritten or never written, the rest can still be saved, but the missing part is gone for good.

Start with an earlier version from File History or OneDrive, then the program's own repair, such as Word's Open and Repair. If those fail, File Repairer rebuilds damaged Word, Excel, PowerPoint, PDF, photo, video, ZIP and RAR files on your own PC, with a preview of what was recovered before you save. It saves repaired copies and never changes the original. Our step-by-step guide on how to repair corrupted files in Windows walks through each option.

Corruption from malware is different. Files encrypted by ransomware are not damaged in a way repair software can undo, and File Repairer does not break encryption. Restore those from a backup.

How to reduce the risk

  • Eject USB drives and cards before unplugging them.
  • Keep a laptop on charge during long saves, exports and copies.
  • Turn on File History or OneDrive so earlier versions exist when something goes wrong.
  • Format camera cards in the camera, and replace cards that throw errors.
  • Watch for warning signs from your drive, such as slow copies, clicking or repeated read errors.
  • Keep Windows, Office and antivirus software up to date.

Our full guide on preventing file corruption goes further, including how to check a drive's health.

Frequently asked questions

Can a virus corrupt files?

Yes, but it is far less common than interrupted saves, removed drives and failing storage. Ransomware encrypts files on purpose, and those need restoring from a backup rather than repairing.

Can a file get corrupted just by opening it?

Opening a file normally does not damage it. Problems come when the program crashes or the drive fails while the file is being saved, which is why working on a copy is safer.

Does a corrupted file mean my hard drive is failing?

Not necessarily. A single damaged file is usually down to an interrupted save or transfer. If many files on the same drive go bad, or copies keep failing, treat the drive as suspect and back it up.

Get three guides like this every month, plus software update notices.Subscribe →