File Corruption
Damage to a file's internal data structure that makes it unreadable or causes it to produce errors when opened.
Last updated
What Is File Corruption?
File corruption is damage to a file's internal data — the bytes that make up the file's content or structural metadata — that causes the file to become partially or fully unreadable.
Levels of Corruption
Structural corruption — the file's internal index or directory is damaged, but the content data is intact. This is the most common and most recoverable type. Example: a PDF with a broken xref table that can be rebuilt.
Content corruption — the actual data (pixel values, text bytes) is damaged. Some data may be recoverable, but corrupted sections cannot be reconstructed. Example: random bytes overwritten in the middle of a JPEG.
Header corruption — the first bytes of the file (the header that identifies the file type) are damaged. The file appears to have the wrong type or no type at all. Example: a ZIP where the first 4 bytes are corrupted, so it cannot be identified as a ZIP.
Common Causes
- Interrupted file transfer or download
- Storage media failure (bad sectors on HDD, SSD, or USB drive)
- Application crash during save
- File system errors after unexpected shutdown
- Virus or ransomware damage
- Email server attachment modification
How to Detect Corruption
- File size is smaller than expected (truncated download)
- File produces an error on open in any application
- File opens in some applications but not others
- Content appears scrambled, blank, or partially rendered
- Checksum does not match the published value
Recovery Priority
Always attempt recovery in this order:
- Re-download from the original source
- Restore from a cloud backup (Google Drive, Dropbox version history)
- Use a format-specific repair tool
- Restore from a local backup
The best protection against corruption is maintaining multiple copies in geographically separate locations.