Data Corruption: What It Is and How to Recover Files

Data Corruption

Data corruption is the unintended alteration of stored or transmitted data. Bits change, but the data isn’t erased; it’s still there, just wrong. The distinction from data loss matters: lost data is gone, corrupted data is present but incorrect. Recovery depends on which layer is corrupted, whether the corruption was detected or silent, and whether a clean copy exists somewhere else.

Reference content reviewed by recovery engineers. Editorial standards. About the authors.
📚
9 sources
Wikipedia · Gillware
Percona · CERN study cited
đŸ’»
3 layers
File · Filesystem · Storage
Different recovery per layer
📅
Last updated
2026 storage practices
📖
8 min
Reading time

Data corruption is the unintended alteration of stored or transmitted data, where bits or bytes change from their intended values without being erased outright. The corrupted data remains physically present but is incorrect, incomplete, or inconsistent. Corruption can be detected (an error is raised when the bad data is encountered) or silent (the change goes unnoticed and the wrong data is treated as correct). It can occur at three layers: file content, filesystem metadata, and storage medium. Causes range from hardware failure and bad sectors to software bugs, RAM errors, malware, interrupted writes, transmission errors, and long-term storage decay.

What Data Corruption Actually Is

Data corruption happens when data is written, stored, or transmitted incorrectly, leaving the data physically present but altered from its intended values. The hallmark of corruption is that the data is still on the storage medium; it just doesn’t match what was written, what’s expected, or what other parts of the system depend on it being.1 A corrupted JPEG opens to show partial color blocks where image data should be. A corrupted database refuses to start because internal consistency checks fail. A corrupted application file produces error messages instead of running. The bytes are there; they’re just wrong bytes.

Corruption is not the same as data loss

The two terms are often used interchangeably, but they describe different problems with different recovery paths:

AspectData corruptionData loss
What happenedBytes still present, but alteredBytes no longer present
Typical causeBad sectors, write interruption, bit rot, RAM errorsDeletion, formatting, drive failure, overwrite
Recovery approachFile repair, filesystem repair, signature recovery from imageUndelete, file carving, partition recovery
Tools that helpFormat-specific repair tools, file carvers, backupsRecovery scanners, file carving, partition reconstruction
Recovery success depends onSeverity of alteration, file format redundancy, presence of backupWhether the data has been overwritten by new writes

Some scenarios involve both. A partially overwritten file is partially lost (the overwritten regions) and partially corrupted (the parts that remain but no longer match the file’s structure). A drive with developing bad sectors may simultaneously cause new writes to be corrupted and old data to be lost as sectors decay. The conceptual distinction matters even when both apply: the question of “is the data still there?” determines which class of recovery tools to reach for.

What “alteration” actually looks like

At the byte level, corruption can be a single-bit flip (one bit changes from 0 to 1 or vice versa), a multi-bit error, a missing chunk (some bytes are zeroed), or wholesale replacement (a region is overwritten with unrelated data). The Percona database team frames this as “corruption is nothing but an improper format or a sequence of data”: the system reading the data expects a specific byte pattern, and what it finds doesn’t match.2 The file or structure may still parse partially, may parse but produce wrong results, or may fail to parse at all.

Detected vs Silent Corruption

The most consequential distinction in data corruption is whether the system noticed it happened. Detected corruption raises an error; silent corruption does not. The tradeoffs are very different.3

Detected corruption

The operating system, application, or storage subsystem recognizes that the data it received doesn’t match its expected form, and it raises an error. Symptoms include:

  • Files that won’t open (“file is corrupted”).
  • Applications that crash on startup or when reading specific files.
  • Archive checksum failures when extracting ZIP, RAR, or TAR files (CRC errors).
  • Database engines refusing to start with integrity-check failures.
  • Backup verifications reporting hash mismatches.
  • Operating system errors when reading specific sectors.

Detected corruption is the easier scenario in one important sense: you know it happened. You can attempt recovery with full awareness that the data is bad. The harder scenario is when the system doesn’t know.

Silent corruption

Silent (or undetected) corruption is the more dangerous form. Data changes, the system has no idea, and the wrong data is treated as correct. The corruption propagates: backups inherit the bad data, computations using it produce more bad results, and the original problem may be discovered only much later when something else breaks.4

Two industry studies illustrate the scale:

  • CERN study (2007): CERN ran a six-month experiment writing and reading specific data patterns across approximately 97 petabytes of storage. About 128 megabytes of data became permanently corrupted silently somewhere in the pipeline from network to disk; the corruption was caught only because CERN was specifically looking for it.
  • NetApp study: NetApp analyzed 1.5 million hard drives over 41 months. The study identified more than 400,000 silent data corruption events. Notably, more than 30,000 of those events were not detected by the hardware RAID controllers; they were caught only during scheduled scrubbing operations that compared data against parity.

The 2008 Amazon S3 outage is a real-world example of silent corruption causing system-wide problems: AWS later acknowledged that data corruption was the cause of a widespread S3 outage, with the corruption propagating before being detected.5 In 2021, both Google and Facebook published findings that faulty processor cores were causing silent computation errors at a rate of several in thousands of cores; corrupted data emerged from CPUs that should have been reliable.

Why silent corruption is hard to fix

Silent corruption defeats most recovery approaches because nothing flags the bad data. Standard practice for protecting against it includes:

  • End-to-end checksums in modern filesystems (ZFS and Btrfs verify checksums on every read; corruption is detected when the data is accessed).
  • ECC RAM (error-correcting memory catches single-bit flips before they reach storage).
  • Periodic scrubbing (RAID systems and filesystems re-read all data periodically and compare against parity or checksums).
  • Backup verification (verifying that backup data matches the source via hashes catches corruption in either side).
  • Redundant copies (multiple copies on different media allow comparison to detect drift).

The Three Corruption Layers

Data corruption can affect storage at three distinct layers, each with different symptoms and different recovery approaches. Identifying which layer is corrupted is the first diagnostic step.6

LayerWhat’s corruptedTypical symptomRecovery approach
File contentBytes within a single fileSpecific file won’t open or shows wrong contentFormat-specific repair, backup restore, partial recovery
Filesystem metadataStructures organizing files into directoriesMultiple files inaccessible, RAW partition status, drive shows Not Initializedchkdsk, fsck, TestDisk, signature recovery
Storage mediumPhysical sectors or NAND cells failingI/O errors, bad sectors, degraded performanceImage first, recover from image, replace drive

Layer 1: File content corruption

The most localized form. Bytes within a specific file are wrong, but the filesystem and storage medium are otherwise healthy. Symptoms appear file-by-file: a JPEG showing partial image with magenta blocks where data is missing, a Word document showing garbled characters, a video that plays partially then freezes, a database file that opens but reports specific row inconsistencies. The rest of the drive’s files are unaffected.

Recovery options for file-content corruption:

  • Restore from backup if a recent clean copy exists. Always the preferred approach.
  • Format-specific repair tools: Microsoft Word’s Open and Repair, photo repair tools for JPEG/PNG, video repair for MP4/MOV, archive repair for ZIP/RAR.
  • File-format internal redundancy: some formats (PNG with multiple chunks, MP4 with cross-references) can survive partial corruption and recover the readable parts.
  • Recovery software with file repair features: several modern tools include format-aware repair alongside file recovery.
  • Shadow copies / Previous Versions on Windows: if enabled, Windows may have a clean version stored locally.

Layer 2: Filesystem metadata corruption

The filesystem is the structure that organizes raw storage into files and directories. When metadata corrupts, multiple files become inaccessible at once even though their content bytes may still be intact on the medium. Symptoms span more than one file: directories showing as empty when they shouldn’t be, drives appearing as RAW partition, drives showing as Not Initialized, files appearing with garbled names, files with zero-byte sizes or wrong dates.

Recovery options for metadata corruption:

  • Filesystem repair utilities: chkdsk (NTFS, FAT), fsck (ext, HFS+, APFS), Disk Utility on macOS. These attempt to repair the filesystem in place; sometimes they succeed completely, sometimes partially, sometimes they make things worse.
  • TestDisk for partition table reconstruction when the partition itself is the corrupted layer.
  • Signature-based file carving when filesystem repair fails. PhotoRec and similar tools extract files by recognizing their content patterns, bypassing the corrupted filesystem entirely.
  • Image-first principle: if the corruption affects a drive with valuable data, image the drive before attempting any in-place repair. Repair attempts on the source can convert recoverable corruption into unrecoverable corruption.

Layer 3: Storage medium corruption

The underlying physical or solid-state storage medium is failing. Sectors no longer reliably retain the bits written to them; reads return wrong data, errors, or nothing. This is the layer where corruption shades into hardware failure: at extreme severity, the drive itself becomes unusable.7

Recovery options for medium corruption:

  • Image with ddrescue immediately. The medium is failing, and every additional read stresses it further. Imaging captures whatever can be read while the drive cooperates.
  • Recover from the image using software (EaseUS, R-Studio, Disk Drill, PhotoRec) rather than the original drive.
  • Replace the drive; do not return data to a drive showing storage-medium corruption.
  • Professional services for drives where imaging at home risks further damage (clicking sounds, severe SMART degradation, drives that disconnect mid-read).

Gillware Data Recovery uses the helpful framework of “hard” versus “soft” corruption: hard corruption is when the data on the medium is genuinely altered (bad sectors actually returning wrong bits); soft corruption is when bad data is a symptom of a fixable hardware problem (a failing read/write head causes apparent corruption that disappears when the head is replaced).8 The distinction matters because soft corruption resolves when the underlying hardware issue is fixed, while hard corruption requires direct repair of the affected data regardless of what hardware fixes are applied.

Common Causes of Data Corruption

Data corruption has many causes operating at different levels of the system. Understanding the cause helps predict whether the corruption is one-time (preventable in the future) or systematic (likely to recur until the underlying issue is addressed).9

Hardware causes

  • Bad sectors developing on hard drives. Specific sectors fail to retain their bits or fail to return them correctly on read. Affected files corrupt when their content lands on the failed sectors.
  • NAND cell wear-out on SSDs. Flash memory has a finite number of write cycles per cell; cells that exceed their endurance lose data retention.
  • RAM errors: single-bit flips from cosmic radiation or faulty memory modules. Wikipedia notes that cosmic rays cause most soft errors in DRAM; a bit changes in memory and the wrong value is then written to disk.
  • Failing read/write heads on hard drives. Heads that aren’t tracking correctly read marginal data, returning approximate but incorrect bytes.
  • Drive controller PCB issues. The chip translating between drive media and host can introduce errors when degraded.
  • Faulty CPU cores. Google and Facebook published findings in 2021 that faulty cores can produce silent computation errors at a rate of several in thousands; corrupted data emerges from processors that should have been reliable.
  • Cable and connection issues producing transmission errors during reads and writes.

Software causes

  • Filesystem bugs. Even mature filesystems have edge cases; rarely-triggered code paths produce corruption.
  • Operating system bugs. Cache management, write buffering, and shutdown sequences are complex; bugs here corrupt data during otherwise routine operations.
  • Application bugs. Programs writing data structures incorrectly produce file-format violations that look like corruption.
  • Driver bugs. Storage drivers that handle commands incorrectly cause corruption at the host-to-device boundary.
  • Firmware bugs. A 2010 study cited on Wikipedia reported that firmware bugs accounted for 5-10% of storage failures across a survey of 39,000 storage systems.

Operational causes

  • Power loss during writes. Files in the middle of being saved are left half-written when power dies. Modern filesystems mitigate this with journaling but don’t fully eliminate it.
  • Improper unmount of removable media. Cached writes haven’t yet been flushed when the drive is removed; the filesystem on the drive is left in an inconsistent state.
  • Sudden shutdowns. Pulling the plug or holding the power button bypasses the orderly write sequence.
  • Heat and environmental stress. Drives running near thermal limits exhibit higher error rates; storage media in high-humidity or vibration environments degrades faster.

External and malicious causes

  • Malware and ransomware. Some malware deliberately corrupts files; ransomware specifically encrypts files (a particular form of corruption from the user’s perspective).
  • Network transmission errors. Files transferred over unreliable networks may arrive with bit errors that aren’t detected without checksum verification.
  • Long-term storage decay (bit rot). Bits on long-stored media gradually degrade. Magnetic media slowly demagnetizes; NAND charge dissipates over time; optical media surfaces oxidize. Wikipedia notes the data corruption rate has remained roughly constant in time, while drive capacities have grown enormously, meaning modern large drives experience more total corruption events than older small drives.

Recovery Approaches by Corruption Type

Recovery strategy varies substantially based on which layer is corrupted, whether the corruption was detected or silent, and whether clean copies exist somewhere in the system. The right tool for one scenario can make another scenario worse.

For single-file content corruption

The smallest scope and usually the easiest to address:

  1. Check for backups first. Cloud backup history, Time Machine, File History, Previous Versions, version control: any clean copy is the simplest recovery.
  2. Try format-specific repair tools. Most major file formats have repair tools tailored to their internal structure.
  3. Try opening in a different application. Sometimes the original application is strict; alternative software may tolerate the corruption and recover what’s readable.
  4. For partial recovery, extract what’s intact. A corrupted MP4 may play the first 30 seconds before failing; specialized extractors can pull out the working portion.

For filesystem-level corruption

Multiple files affected at once, often presenting as RAW partition or directory inconsistencies:

  1. Image the drive first if data matters. Filesystem repair tools sometimes worsen damage; an image is your insurance policy.
  2. Try filesystem repair against the image, not the source. chkdsk on Windows, fsck on Linux/macOS. If repair fails, the source drive is unchanged.
  3. Try TestDisk for partition-level repair. Especially valuable when the partition table or boot sector is the damaged element.
  4. Fall back to file carving when filesystem-level recovery fails. PhotoRec, EaseUS, R-Studio, Disk Drill all support this approach.

For storage-medium corruption

The drive itself is failing. Recovery here is racing against further degradation:

  1. Stop using the drive immediately. Each additional read stresses the failing medium.
  2. Image with ddrescue: sudo ddrescue -d /dev/sdX drive.img drive.mapfile. Multiple passes recover data that the first pass couldn’t read.
  3. Run recovery against the image, not the source. Recovery software, file repair, filesystem repair all proceed against drive.img.
  4. For severely degraded drives (clicking, persistent I/O errors, drives that disconnect mid-read), professional recovery services with cleanroom capabilities are the right escalation.

For silent corruption

The hardest scenario because the corruption isn’t flagged. Discovery usually happens when something downstream fails. Recovery options are limited:

  • Compare against backups. If verified backups exist from before the corruption window, restore the affected data.
  • Use redundant copies. RAID systems with parity or mirroring may have a clean copy; ZFS and Btrfs scrubbing can detect and repair corruption automatically.
  • Reconstruct from partial information. For databases and structured data, sometimes the corrupted records can be reconstructed from related uncorrupted records.
  • Accept partial loss when no clean copy exists. Silent corruption without backups often produces unrecoverable data; the lesson for next time is verified backups and end-to-end checksums.

Data corruption is the recovery scenario where understanding the layer of corruption is the difference between recovering everything and losing everything. The same surface symptom (a file won’t open) can come from any of the three layers, and the right recovery action for each layer is incompatible with the others. Running chkdsk on a drive with storage-medium corruption can convert recoverable scenarios into unrecoverable ones because chkdsk writes to the failing drive. Trying file-format repair on filesystem-level corruption misses the actual problem. Imaging a healthy drive looking for storage-medium corruption that isn’t there wastes hours on the wrong path. The diagnostic question that orders the recovery: is one file affected, multiple files, or the whole drive?

Silent corruption is the under-discussed class of the problem. SERP articles tend to describe corruption in terms of the obvious symptoms (files that won’t open, error messages), which biases toward detected corruption. The CERN and NetApp studies show that silent corruption is happening at meaningful rates in production storage systems, often invisible until something downstream catches it. Recovery software handles detected corruption well; silent corruption requires architectural defenses (checksumming filesystems, verified backups, ECC memory) that have to be in place before the corruption occurs. The recovery for silent corruption that’s already happened is usually limited to whatever clean copies exist elsewhere; without those copies, the corrupted data may be unrecoverable.

For the broader storage-error vocabulary, data corruption is the underlying mechanism that produces many of the user-visible scenarios in the cluster. RAW partition is filesystem-metadata corruption made visible. CRC errors are detected file-content corruption flagged at the read. Drive Not Initialized is partition-table corruption (a specific case of metadata corruption). I/O device errors often result from storage-medium corruption severe enough to interrupt communication. The right framing for users: when something looks like corruption, identify which layer is corrupt, choose the recovery approach for that specific layer, and image the drive before any in-place repair when the data matters. The image-first principle has saved more recoveries than any specific repair tool, because it gives you something to fall back to when the first repair attempt makes things worse.

Data Corruption FAQ

What is data corruption?+

Data corruption is the unintended alteration of stored or transmitted data. Bits or bytes change from their intended values, but unlike data loss, the corrupted data is still present on the storage medium; it’s just wrong. Corruption can affect a single file, a group of files sharing common metadata, or an entire filesystem’s organizational structures. The corruption may be detected (an error is raised when the bad data is encountered) or silent (the wrong data passes through the system unnoticed). The practical effect ranges from a single file that won’t open to subtle errors that propagate through backups and computations until detected much later.

What’s the difference between data corruption and data loss?+

Data loss means the data is no longer present: deleted, formatted away, or destroyed by physical drive failure. Data corruption means the data is physically present on the storage medium but is incorrect or unreadable in its current form. The distinction matters for recovery: lost data needs tools that can find traces of files in unallocated space (file carving, undelete tools); corrupted data needs tools that understand the file format and can reconstruct or repair the damaged content. Some scenarios involve both: a partially overwritten file is partially lost (the overwritten parts) and partially corrupted (the parts that remain but are now inconsistent with the file’s structure).

What causes data corruption?+

Many causes contribute. Hardware failures, especially developing bad sectors on hard drives or NAND cell wear-out on SSDs, are the most common. Power loss during write operations is a frequent cause; the file is half-written when power dies, leaving inconsistent state. RAM errors (single-bit flips from cosmic rays or faulty memory modules) corrupt data while it’s being processed before storage. Software bugs in operating systems, file systems, or applications can write incorrect data to disk. Improper unmount of removable media interrupts cached writes. Network errors during transmission alter packets in flight. Malware and ransomware deliberately corrupt files. Long-term storage degradation (bit rot) gradually changes bits on archived media that hasn’t been read in years.

What is silent data corruption?+

Silent data corruption is corruption that occurs without any error being raised. The data changes, the system has no idea, and the wrong data is treated as correct. The risk is that silent corruption propagates: backups inherit the bad data, computations use the bad data to produce more bad data, and the original error may be discovered only much later when something else fails. CERN ran a study over six months on 97 petabytes of data and found about 128 megabytes had become permanently corrupted silently somewhere in the pipeline from network to disk. NetApp studied 1.5 million hard drives over 41 months and found over 400,000 silent corruption events, with 30,000 of them not detected by the hardware RAID controllers and only caught by scheduled scrubbing. Modern filesystems like ZFS and Btrfs use end-to-end checksums specifically to detect silent corruption.

Can corrupted files be recovered?+

Sometimes, depending on which layer is corrupted and how badly. File content corruption (bytes within a single file are wrong) is recoverable if a backup or shadow copy exists, partially recoverable if the file format has internal redundancy or the corruption affects only part of the file, and unrecoverable if the file is too damaged for any tool to repair. Filesystem metadata corruption (the structures that organize files into directories) is often repairable with chkdsk, fsck, or specialized tools like TestDisk, and even when not repairable, file carving tools can extract files by signature without using the metadata. Storage medium corruption (the underlying device is failing) requires imaging the drive first to a known-good destination, then recovering from the image rather than the failing source.

How can I prevent data corruption?+

No prevention is perfect, but several practices substantially reduce the risk. Use a UPS (uninterruptible power supply) to prevent power loss during writes. Always safe-eject removable media before unplugging. Use ECC RAM on systems where data integrity matters; ECC catches single-bit errors that would otherwise propagate to disk. Use modern filesystems with built-in checksumming (ZFS, Btrfs) for archival storage. Keep regular backups with verification (verified backups confirm the backup data isn’t itself corrupted). For long-term archives, use redundancy schemes like PAR2 files that allow corruption recovery. Monitor SMART data on drives for early warning of failing storage. Don’t run drives at high temperatures or in high-vibration environments. Replace drives showing increasing reallocated sector counts before they fail completely.

Related glossary entries

  • RAW Partition: filesystem-metadata corruption made visible at the partition level.
  • CRC Error: detected corruption flagged by checksum failure during reads.
  • Bad Sectors: storage-medium-level corruption affecting specific physical regions.
  • Drive Not Initialized: partition-table corruption, a specific case of metadata corruption.
  • File Carving: signature-based recovery when filesystem metadata is corrupted.
  • Disk Image: image first when storage-medium corruption is suspected.
  • Data Recovery: the umbrella concept; corruption is one scenario within it.

About the Authors

đŸ‘„ Researched & Reviewed By
Rachel Dawson
Rachel Dawson
Technical Approver · Data Recovery Engineer

Rachel brings over twelve years of data recovery engineering experience and has handled corruption cases ranging from single-file repairs to enterprise databases with cascading silent corruption. The hard versus soft corruption distinction in this entry reflects her routine diagnostic process: identifying whether the visible corruption is the actual problem or a symptom of something else lets the recovery team direct their effort at the right target rather than chasing symptoms.

12+ years data recovery engineering PC-3000 certified Hard/soft corruption specialist
✅
Editorial Independence & Affiliate Disclosure

Data Recovery Fix earns revenue through affiliate links on some product recommendations. This does not influence our reference content. Glossary entries are written and reviewed independently based on documented research, vendor documentation, independent testing, and recovery-engineer review. If anything on this page looks inaccurate, outdated, or worth revisiting, please reach out at contact@datarecoveryfix.com and we’ll review it promptly.

We will be happy to hear your thoughts

Leave a reply

Data Recovery Fix: Reviews, Comparisons and Tutorials
Logo