If files won't open, a drive keeps asking to be scanned or Windows reports file system corruption, CHKDSK is the built-in tool for the job. It checks the file system on a drive and can repair logical errors. This guide is based on Microsoft's command reference.
What CHKDSK does (and doesn't do)
CHKDSK examines a volume's file system and reports errors it finds. Microsoft's documentation says it only corrects logical disk errors if you use the /f parameter, and it must be able to lock the drive to do so.
It doesn't tell you how healthy an SSD's flash memory is or how much life it has left. For that, check the drive's SMART data with a tool such as CrystalDiskInfo or the maker's own software; see how to check SSD health.
Back up first. Repairs change the file system. If a drive is failing, copying your important files off it is more urgent than repairing it. Our Windows 11 backup guide covers the options.
Open an administrator terminal
Right-click the Start button.
Select Terminal (Admin) (or Windows PowerShell (Admin) on some builds).
Approve the User Account Control prompt.
Step 1: run a read-only check
Type the following and press Enter (swap C: for the drive letter you want to check):
chkdsk C:
Without /f, CHKDSK reports problems but doesn't fix them. Microsoft notes that on a drive that's in use, this mode "might report spurious errors" because it can't lock the drive, so treat a few warnings on your Windows drive with some caution.
Step 2: run an online scan (NTFS)
On NTFS drives, the /scan option runs an online scan while the drive stays in use:
chkdsk C: /scan
Microsoft lists /perf as an add-on for /scan that uses more system resources to finish faster, at the cost of slowing other tasks:
chkdsk C: /scan /perf
Step 3: fix errors with /f
If the scan finds problems, run:
chkdsk C: /f
For your Windows drive, CHKDSK can't lock it while Windows is running. You'll see a message asking whether to schedule the check for the next restart. Type Y, press Enter and restart. Microsoft says that if the drive is a boot partition, CHKDSK restarts the computer automatically after checking it. On a data drive, you can add /x to force the volume to dismount first; Microsoft notes that this invalidates all open handles to the drive, so save and close anything on it first.
When to use /r
chkdsk D: /r
Microsoft says /r locates bad sectors and recovers readable information, and that it includes everything /f does. It's aimed at physical disk errors, so it's most relevant to hard drives, and it can take a long time on large disks. On an SSD, a SMART health check with the maker's tool or CrystalDiskInfo is usually the more useful first step when you suspect hardware problems.
Other useful switches
/x forces the volume to dismount first, invalidating open handles, and includes /f.
/spotfix (NTFS) runs spot fixing on the volume.
/i and /c (NTFS) skip some checks to save time.
If CHKDSK keeps finding errors
Repeated file system errors are worth investigating further rather than repairing again and again. Check the drive's health, run a memory test with MemTest86, and if Windows system files are damaged, try DISM and SFC. For crashes and restarts, Event Viewer can show what happened.
Our verdict
Start with a plain chkdsk or chkdsk /scan to see whether there's a problem, and only use /f when it finds errors, scheduling it for the next restart if it's your Windows drive. Keep /r for hard drives with suspected bad sectors, back up before any repair, and check an SSD's SMART health separately, because CHKDSK only fixes the file system, not the hardware.