How to Check for Corrupted Files on Windows, Mac, and Beyond

File corruption is one of those problems that sneaks up on you. A document that won't open, a video that freezes mid-playback, a program that crashes on launch — these can all trace back to a corrupted file. The good news is that most operating systems include built-in tools to detect and sometimes repair corrupted files, and knowing how to use them can save you a lot of frustration.

What Does File Corruption Actually Mean?

A file is corrupted when its data has been altered, partially overwritten, or become unreadable in a way that breaks its expected structure. This can happen for several reasons:

  • Interrupted writes — a file being saved when the power cuts out or a drive is ejected too soon
  • Bad sectors on an aging hard drive or failing SSD
  • Malware that modifies or encrypts file contents
  • File system errors caused by software crashes or improper shutdowns
  • Bit rot — gradual data degradation over time, more common on older mechanical drives and optical media

Corruption can affect any file type: documents, executables, system files, media, or entire disk partitions.

How to Check for Corrupted Files on Windows 🔍

Windows includes several native utilities designed specifically for this.

System File Checker (SFC)

SFC is the most direct tool for checking Windows system files. It scans protected OS files and replaces corrupted versions with cached copies.

To run it:

  1. Open Command Prompt as Administrator
  2. Type sfc /scannow and press Enter
  3. Wait for the scan to complete — it can take several minutes

SFC will report whether it found issues and whether it was able to repair them. If it detects corruption but can't fix it, it logs details in CBS.log inside C:WindowsLogsCBS.

DISM (Deployment Image Servicing and Management)

If SFC fails to repair files, DISM can restore the Windows image that SFC draws from. Run this command in an elevated Command Prompt:

DISM /Online /Cleanup-Image /RestoreHealth 

DISM contacts Windows Update to pull clean file versions, so an internet connection is required.

Check Disk (CHKDSK)

CHKDSK scans the file system and disk surface for errors — not just individual files, but the underlying structure of the drive.

chkdsk C: /f /r 

The /f flag fixes file system errors; /r locates bad sectors and attempts recovery. Running CHKDSK on your system drive usually requires a restart to complete before Windows loads.

How to Check for Corrupted Files on macOS

First Aid in Disk Utility

macOS handles most disk and file system checks through Disk Utility.

  1. Open Disk Utility (Applications → Utilities)
  2. Select your drive or volume from the sidebar
  3. Click First Aid, then Run

First Aid checks the file system for errors and repairs what it can. It works on both internal and external drives and is the recommended first step for any suspected disk or file issue on a Mac.

Terminal-Based Verification

For more granular checks, the fsck command in Terminal performs deep file system verification. On macOS, this is typically run in Recovery Mode for the startup disk:

  1. Restart and hold Command + R to boot into Recovery Mode
  2. Open Terminal from the Utilities menu
  3. Run fsck -fy

This is more thorough than First Aid in some scenarios, particularly when file system integrity is in question at a low level.

Checking Individual Files vs. Entire Drives

There's an important distinction between checking specific files and scanning an entire drive or system.

ApproachBest ForTools
System file scanOS instability, crashes, update failuresSFC, DISM (Windows)
Disk-level checkDrive errors, bad sectors, file system damageCHKDSK, fsck, Disk Utility
Individual file checkA specific document, image, or media fileFile-specific apps, hash verification
Full backup integrityVerifying backup archives are intact7-Zip, built-in archive tools

For individual files, the method depends on the file type. A ZIP or RAR archive can be tested using a tool like 7-Zip's "Test Archive" function. Image files can often be verified by attempting to open them in a viewer that reports read errors. For critical documents, comparing checksums (MD5, SHA-256) against a known-good value confirms whether a file has changed.

Signs a File May Be Corrupted ⚠️

You don't always need to run a scan to suspect corruption. Common indicators include:

  • Applications crash when opening a specific file
  • Media files show visual artifacts, scrambled audio, or stop playing unexpectedly
  • A file's reported size is 0 KB or significantly smaller than expected
  • Error messages referencing "invalid file format" or "file cannot be opened"
  • Files that appear in a folder but produce errors when accessed

These symptoms don't always confirm corruption — compatibility issues or missing codecs can produce similar errors — but they're a reasonable trigger to investigate further.

What Affects Your Results

How effective these tools are depends on several variables:

  • Drive type: SSDs and HDDs fail differently. SSDs are less prone to bad sectors but can fail suddenly; HDDs develop bad sectors gradually, making CHKDSK more relevant over time.
  • OS version: Some SFC and DISM behaviors differ between Windows 10 and Windows 11. macOS First Aid has also evolved across major versions.
  • Severity of corruption: Minor file system errors are often repairable; physical media damage or deep partition corruption may require specialized data recovery software or professional services.
  • Whether a backup exists: Detection is only half the picture — recovery depends entirely on whether clean copies exist elsewhere.

When Built-In Tools Aren't Enough

Native tools have real limits. They're designed for common scenarios and standard file systems (NTFS, APFS, FAT32). If you're dealing with a failing drive, a non-standard partition format, or corruption affecting critical personal files with no backup, third-party recovery tools or professional data recovery services become relevant — though that's a different decision depending on what's at stake and how technically confident you are.

What the right approach looks like for your situation depends heavily on whether you're troubleshooting a system issue, a single problem file, or an aging drive you're not sure you can trust anymore.