Can you repair bad sectors on a hard drive?

A bad sector is a section of a hard drive that has become physically damaged and can no longer reliably store data. Bad sectors most commonly occur due to physical damage to the hard drive platters or aging hard drive components. While a hard drive can continue functioning with some bad sectors, too many bad sectors can lead to data loss and drive failure. Fortunately, it is sometimes possible to repair bad sectors on a hard drive and extend its usable life. Here is an in-depth look at what causes bad sectors, how to detect them, and options for repairing bad sectors.

What causes bad sectors?

There are several potential causes of bad sectors on a hard drive:

Physical damage

Physical damage to the hard drive platters is one of the most common causes of bad sectors. This can occur due to:

  • Dropping, hitting, or jarring the hard drive
  • Excessive heat from a defective cooling system
  • Manufacturing defects in the platters
  • Read/write heads touching the platters

Any physical damage can cause the surfaces of the platters to develop flaws that prevent data from being reliably written or read in those areas.

Magnetic interference

Interference from magnetic fields can also corrupt data written to the platters. Sources of magnetic interference include:

  • Speakers
  • Motors
  • Magnets
  • High-current wiring

If the drive detects errors caused by magnetic interference, those sectors may be marked bad.

Old age

As a hard drive ages, physical wear and tear can cause bad sectors to develop. Parts like the read/write heads and platters slowly degrade over time with normal usage. After several years, the number of bad sectors may exceed the drive’s spare sector threshold and make the drive unusable.

Firmware bugs

In some cases, bugs in a hard drive’s firmware can mistakenly flag legitimate sectors as bad. While not a true physical defect, these false positives will still be mapped out by the drive like bad sectors.

How to detect bad sectors

There are a few ways to check a hard drive for bad sectors:

S.M.A.R.T. reports

Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T.) is a monitoring system built into hard drives. S.M.A.R.T. provides status reports on various drive attributes, including detected bad sectors. Many drive utilities can read S.M.A.R.T. data to check for reallocated or pending sectors.

Scan disk

Tools like CHKDSK in Windows and fsck in Linux can scan drives and detect bad sectors. These utilities can find logical bad sectors that prevent files from being read.

Drive testing software

Dedicated hard drive diagnostic utilities like SeaTools or Victoria for Windows can perform more comprehensive tests. They stress test the drive by reading from every sector to identify any weak points.

Repairing bad sectors

When bad sectors are detected, the operating system will remap them to spare sectors. However, once spare sectors are exhausted, the drive will have to manage active bad sectors. At that point, software repairs may be able to restore some bad sectors and prolong the drive’s lifespan. Here are some bad sector repair options:

Low-level formatting

Bad sectors can sometimes be repaired by performing a low-level format, which rewrites the hard drive’s formatting, including sector mappings. This has the potential to fix false bad sector markings. However, low-level formats will destroy all data on the drive.


Overwriting bad sectors may allow them to be readable again. Software like HDDScan can attempt to write new data on bad sectors to force remapping. This technique carries a risk of making the sectors completely unreadable if the write fails.

Swap heads

For drives with multiple read/write heads, swapping heads may provide access to sectors that were previously unreadable by one head. Head swapping essentially gives a second chance to read sectors marked bad.

Repair Method Description Risks
Low-level format Rewrites drive formatting and sector mappings Destructive, data loss
Overwriting Writes new data to bad sectors May make sectors permanently unreadable
Swap heads Tries reading with different R/W head No risks, but limited scenarios

When to avoid repairs

With hard drives that contain important data, it is generally safest to avoid sector repairs. Low-level formatting and overwriting have risks of data loss. Swapping heads may prolong the drive’s life, but it is a temporary fix.

For drives with critical data, it is advisable to copy the data to a new drive rather than attempting repairs. Drive repairs are usually only warranted on non-essential drives.

Replacing vs. repairing a drive

Once a hard drive has developed a large number of bad sectors, repairs may no longer be worthwhile. At that point, replacement becomes the better option.

As a general rule, if more than 10-15% of a drive’s sectors have gone bad, replacing the drive is preferable to repairing bad sectors. With such a high bad sector count, the risk of data loss also increases significantly.

The table below summarizes when replacement or repair is typically the better choice:

Bad sector range Recommendation
Less than 10-15% Try repairs first
More than 15% Replace the drive

Best practices to avoid bad sectors

While some bad sectors are unavoidable, you can take steps to minimize bad sector formation:

  • Handle hard drives gently and protect from drops/shocks
  • Keep drives securely mounted in the computer case
  • Maintain proper cooling and operating temperatures
  • Use a surge protector to avoid power spikes
  • Don’t magnetize tools near drives
  • Perform regular backups to protect data

Following best practices for installation, handling, and operating hard drives can help maximize their healthy lifespan.


Bad sectors are relatively common on aging hard drives, but several options exist for repairing them and recovering damaged drive space. Low-level formatting, overwriting, and head swapping can all potentially fix bad sectors, but also carry risks. Once bad sectors affect 15% or more of a drive, replacement is usually the safest choice. With preventive care and maintenance, drives can avoid developing major bad sector issues.