Last updated:
The chkdsk (Check Disk) utility is a built-in Windows command that scans hard drives for file system errors, bad sectors, and corrupt data, then repairs them.
Run it from Command Prompt as Administrator, via File Explorer drive properties, or the Windows Recovery Environment when your PC cannot boot normally. chkdsk only works on local disks, not a mapped network drive. For damaged Windows system files rather than disk faults, use the sfc command to fix corrupt files, or go a step further with DISM RestoreHealth and SFC together when sfc alone reports it could not fix everything.
Quick Answer
Open Command Prompt as Administrator and run chkdsk C: /f /r — Windows schedules the scan for the next restart since the C: drive cannot be locked while in use.
How to Use chkdsk on Windows
Method 1: Run chkdsk via Command Prompt
Open Start, search for cmd, right-click Command Prompt, and select Run as administrator to open an elevated terminal window.
Read-Only Scan (No Flags)
Running chkdsk with no flags performs a read-only scan — it lists errors found on the current drive without making any changes or attempting repairs.
chkdsk
Fix Logical Errors: chkdsk /f
The /f flag fixes logical file system errors. On the C: drive, Windows cannot lock the volume while running, so it schedules the repair for the next restart.
chkdsk C: /f

Fix Bad Sectors: chkdsk /r
The /r flag locates bad sectors and recovers readable data from them. It includes all /f functionality and adds two extra scan stages for bad cluster detection.
chkdsk C: /r
For a different drive — for example D: — replace the letter: chkdsk D: /f /r scans and fixes both logical errors and bad sectors on that volume.

When chkdsk /r runs, it adds two stages beyond the standard three: Stage 4 scans for bad clusters in user file data, and Stage 5 checks for bad free clusters.
Force Dismount: chkdsk /x
Use /x when chkdsk returns “Cannot lock current drive” — it forces a dismount of the volume and then runs /f automatically to fix the errors found.
chkdsk D: /x
Online Scan Without Unmounting: chkdsk /scan
The /scan flag runs an online scan without unmounting the drive — ideal for non-system volumes that are actively in use by other programs at the time.
chkdsk D: /scan

Add /perf with /scan to use more CPU and complete the scan faster — close other programs first since this option is resource-intensive by design.
chkdsk /scan /perf

Note: The /scan /perf combination works on NTFS volumes only. It will not run on FAT32 or exFAT formatted drives.
Offline Scan and Fix: chkdsk /offlinescanandfix
Use /offlinescanandfix when /scan detects errors it cannot repair online — this schedules a full offline repair pass to run at the next system restart.
chkdsk /offlinescanandfix

To cancel a scheduled chkdsk before the next restart, run the command below and type N when prompted — this unschedules the pending repair immediately.
chkntfs /x C:
Method 2: Run chkdsk via File Explorer
File Explorer provides a GUI way to run a basic chkdsk scan without opening a terminal — right-click any drive and access the check tool through its Properties dialog.
Step 1: Open File Explorer, click This PC, right-click the drive you want to check, and choose Properties (or press Alt + Enter after selecting it).
Step 2: Select the Tools tab and click the Check button under Error Checking, then click Scan drive to start the process.

The GUI scan runs in three stages: file record verification, index validation, and security descriptor authentication — each checking a different layer of the file system.
Stuck at this step? Ask us, it is free and include the exact error.
Click Show Details after the scan completes to open Event Viewer and review the full log of everything chkdsk found and fixed on the selected drive.

Method 3: Run chkdsk via Windows Recovery Environment (WinRE)
Use WinRE when Windows cannot boot due to severe disk corruption — it lets you run chkdsk against the system drive before the OS attempts to load at all. If the drive itself is fine but the firmware settings are wrong, you may need to open the BIOS menu in Windows 11 and check the boot order.
Step 1: Boot from a Windows installation USB or DVD and click Repair your computer instead of Install Now on the first setup screen that appears.

Step 2: Navigate to Troubleshoot → Advanced options → Command Prompt to open a terminal that runs completely outside the Windows environment.

Step 3: Run chkdsk C: /f /r to scan and repair the C: drive. Replace C: with the correct letter if Windows is installed on a different volume.
chkdsk Flags Quick Reference
Here are the most useful chkdsk flags and what each one does — combine them as needed for more thorough scans and repairs on any Windows drive format.
| Flag | What It Does |
|---|---|
/f |
Fixes file system errors on the specified volume |
/r |
Locates bad sectors and recovers readable data (includes /f) |
/x |
Forces a dismount before running /f — use when drive is locked |
/scan |
Runs an online scan without unmounting the volume |
/perf |
Uses more CPU to speed up /scan (NTFS volumes only) |
/offlinescanandfix |
Schedules an offline repair when /scan finds unfixable errors |
/v |
Lists the name of every file in every directory as it checks (FAT/FAT32) or displays cleanup messages, if any (NTFS) |
/i |
NTFS only. Does a less thorough check of index entries to finish faster |
/c |
NTFS only. Skips checking cycles within the folder structure to finish faster |
/l[:size] |
NTFS only. Changes the log file size in KB, or shows the current size if you omit the number |
/b |
NTFS only. Clears the saved list of bad clusters and rescans every cluster; includes /r. Use after cloning a drive to a replacement disk |
You need to be a member of the local Administrators group to run chkdsk with any repair flag. When chkdsk finishes, it also sets an exit code you can check in a script with echo %errorlevel% right after the command: 0 means no errors were found, 1 means errors were found and fixed, 2 means it performed (or skipped, without /f) cleanup such as garbage collection, and 3 means it could not check the disk or could not fix what it found.
When chkdsk Is the Right Tool
Run chkdsk when your PC boots slowly, blue screens mention file system errors, a drive shows warnings in File Explorer, or files become inaccessible unexpectedly.
It is also the right fix after an unexpected power outage or forced shutdown — Windows marks the drive as “dirty,” and chkdsk clears that flag after a clean scan pass.
For preventive maintenance, run chkdsk D: /scan monthly on secondary drives to catch developing errors before they escalate into data loss or full drive failure.
If chkdsk repeatedly finds the same errors on every scan, the physical drive hardware may be failing — back up your data and plan to replace the drive promptly. When repairs no longer help, it may be time to factory reset Windows 10.
Troubleshooting chkdsk
| Message or symptom | Likely cause | Fix |
|---|---|---|
| Cannot lock current drive | The volume is in use and Windows cannot get exclusive access to it while chkdsk runs | Schedule the check for next restart (answer Y when prompted, or use /f on the system drive), or force it with chkdsk /x |
| Access is denied | Command Prompt was not run as Administrator, or your account is not in the local Administrators group | Reopen Command Prompt with Run as administrator and try again |
| The type of the file system is RAW | Windows cannot recognize a file system on the drive at all (corrupted partition table or an unformatted disk), so chkdsk has nothing to check | chkdsk cannot fix a RAW drive; recover data with dedicated recovery software first, then reformat |
| chkdsk keeps finding the same errors every time it runs | The underlying disk hardware is failing, not just the file system | Back up your data immediately and plan to replace the drive; check its S.M.A.R.T. status with the drive manufacturer’s tool |
| chkdsk will not run on a mapped network drive | chkdsk only checks local disks; it cannot be used with a drive letter that has been redirected over the network | Run chkdsk directly on the computer that physically hosts the drive |
FAQ
Does chkdsk delete my files? No, not by design. /f and /r repair the file system and attempt to recover readable data from bad sectors; data that is genuinely unreadable can be lost, which is why a current backup matters before a /r scan on a failing drive.
How long does chkdsk take? A read-only scan is usually quick, but /f and especially /r can take anywhere from several minutes to many hours on a large or heavily used drive with millions of files, since /r adds a sector-by-sector read of the whole disk.
Can I cancel chkdsk once it starts? Yes. Interrupting it is not recommended, but canceling or losing power mid-scan should not leave the volume more corrupted than it already was; just rerun chkdsk afterward to finish the check.
Does chkdsk work on SSDs, not just hard drives? Yes, the file system checks (/f, /i, /c) apply equally to SSDs. The bad-sector recovery pass in /r still runs on an SSD, but failing SSDs usually show up as reallocated or worn-out flash blocks rather than classic mechanical bad sectors.