Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Repair Corrupted Files on Mac: Full Guide

· 6 min read · Home Tech

In this article
  1. What Causes File Corruption on a Mac?
  2. How to Diagnose a Corrupted File
  3. First Aid: The Built-in Disk Repair Tool
  4. Repairing Specific File Types
  5. Using Time Machine to Restore a Previous Version
  6. Third-Party Recovery Tools
  7. Preventing File Corruption
  8. Frequently Asked Questions

Corrupted files on a Mac can stop apps from opening, make documents unreadable, or cause system errors. This guide explains what causes file corruption, how to diagnose it, and the safest ways to repair or recover your data using built-in macOS tools and a few reliable third-party options.

What Causes File Corruption on a Mac?

File corruption happens when the data that makes up a file becomes damaged or unreadable. Common causes include:

  • Sudden power loss or a crash while a file is being written or saved.
  • Force-quitting an app mid-save, which can leave a partially written file.
  • Disk errors from a failing hard drive or SSD, bad sectors, or a damaged file system.
  • Interrupted downloads or transfers (e.g., a USB drive pulled out too early, a network drop).
  • Malware or third-party software that modifies files incorrectly.
  • File system issues like directory damage, often from improper shutdowns.

Sometimes the file itself is fine but the app that opens it is corrupted or the file permissions are wrong. That’s why the first step is always to figure out where the problem actually lies.

How to Diagnose a Corrupted File

Before trying any repair, confirm that the file is truly corrupted and not just unreadable by a specific app.

  1. Try opening the file with a different app. For example, a Pages document might open in TextEdit (though formatting may be lost). If it opens, the file is probably fine—the original app may be the issue.
  2. Check the file size in Finder. A file that is 0 KB or far smaller than expected is likely truncated or empty.
  3. Look at the file icon. A generic blank icon often means the system can’t recognize the file type.
  4. Run First Aid on the disk (see below) to rule out disk-level corruption.
  5. Try opening the file on another Mac or with a different user account. If it works elsewhere, the problem is local.

First Aid: The Built-in Disk Repair Tool

macOS includes a disk repair utility called First Aid inside Disk Utility. It checks the file system structure and repairs directory damage, which is a common source of file corruption.

  1. Open Disk Utility (in /Applications/Utilities/).
  2. Select the disk or volume that contains the corrupted file (usually your startup disk, named “Macintosh HD”).
  3. Click First Aid in the toolbar, then Run.
  4. Follow the prompts. First Aid may take several minutes and may ask to restart your Mac if it needs to unmount the disk.

First Aid can fix many disk-level problems, but it won’t repair a file that’s already damaged—it only repairs the file system structure. If the file itself is corrupt, you’ll need a different approach.

Repairing Specific File Types

Some file types have built-in recovery options:

  • Microsoft Office documents (Word, Excel, PowerPoint): Open the app, go to File > Open, select the file, and click the arrow next to the Open button to choose Open and Repair.
  • Photos and images: Try opening in Preview, then File > Duplicate and save as a new file. For severe damage, use a dedicated image repair tool like Stellar Phoenix JPEG Repair (free trial) or HexFiend (free) for manual hex editing (advanced).
  • PDFs: Open in Preview and try File > Export to re-save. Or use Adobe Acrobat’s “Repair” feature if you have it.
  • ZIP archives: Use Archive Utility (built-in) or The Unarchiver (free) to attempt extraction. If the archive is corrupt, try StuffIt Expander or command-line tools like zip -FF.
  • Video files: HandBrake (free) can often re-encode a damaged video, or use VLC’s “Repair” feature (it can play incomplete files).

Using Time Machine to Restore a Previous Version

If you have Time Machine backups, you can often recover a good version of the file from before it became corrupted.

  1. Open the folder that contains the corrupted file in Finder.
  2. Enter Time Machine (click the Time Machine icon in the menu bar, or open it from Launchpad).
  3. Use the timeline on the right to go back to a date when the file was working.
  4. Select the file and click Restore. It will be copied to its original location, replacing the corrupted version (or you can hold Option to copy without replacing).

If you don’t have Time Machine, check for other backups (iCloud, external drives, cloud storage like Dropbox or Google Drive) that may have an older version.

Third-Party Recovery Tools

When built-in tools fail, third-party software can sometimes recover data from corrupted files. These are general-purpose tools that work on many file types:

  • Disk Drill (free trial, paid) – scans for recoverable files and can often restore deleted or damaged files.
  • Data Rescue (paid) – deep-scan recovery for hard drives and SSDs.
  • Stellar Data Recovery (free trial, paid) – supports many file types and has a Mac version.
  • EaseUS Data Recovery Wizard (free trial, paid) – another popular option.

These tools work best if you stop using the disk immediately after discovering corruption, because continued use can overwrite the damaged areas. Always recover to a different drive.

Preventing File Corruption

Prevention is far easier than repair. Follow these habits to reduce the risk:

  • Always eject external drives properly (drag to Trash or press Cmd+E).
  • Use a UPS for your Mac to avoid power cuts during writes.
  • Keep your Mac updated – macOS updates often include file system fixes.
  • Run First Aid periodically, especially after a crash or improper shutdown.
  • Back up regularly with Time Machine or another system.
  • Avoid force-quitting apps while they are saving; wait for the save to finish.

Frequently Asked Questions

Can I repair a corrupted file without any software?

Yes, for many cases. Try First Aid, open in a different app, or restore from Time Machine. For documents, the app’s built-in repair (like Word’s “Open and Repair”) is often enough. If those fail, you may need a dedicated tool.

Will Disk Utility’s First Aid delete my files?

No, First Aid only repairs the file system structure. It does not delete files, but it may move damaged files to a “Recovered” folder if it finds them. Always back up before running it, just in case.

Why does my Mac say the file is damaged and can’t be opened?

This error often appears for downloaded apps, not documents. It means macOS’s Gatekeeper has flagged the app as untrusted. To open it, right-click the file and select Open, then confirm. For actual data files, the error usually means the file header is corrupt.

Can a corrupted file be fixed if it’s on an external drive?

Yes, the same methods apply. Run First Aid on the external drive, try opening the file on your Mac, and use recovery tools if needed. The key is to stop using the drive immediately to avoid overwriting data.

Is it possible to recover a corrupted file that I never backed up?

Sometimes, but it depends on the damage. If the file is only partially overwritten, tools like Disk Drill or Data Rescue might recover remnants. If the file is completely overwritten or the disk has physical damage, recovery is unlikely.

What should I do if my Mac won’t start because of a corrupted system file?

Boot into macOS Recovery (hold Cmd+R at startup) and run Disk Utility > First Aid on your startup disk. If that doesn’t work, you can reinstall macOS without erasing your data. If the disk is failing, you may need to replace it.