If a file on your Mac will not open, first protect the original. The cause may be a damaged file, the wrong app or format, a sync conflict, or a storage-device error. No repair tool can guarantee recovery, and writing repeatedly to a failing drive can make recovery harder.
1. Preserve the original file
In Finder, make a copy of the file on a different healthy drive if it can be read. Work on that copy, leaving the original untouched. If copying fails, the external drive disconnects, or many files suddenly fail, stop trying to edit them and move to the drive checks below. If the file is important and the drive makes unusual noises, seek professional recovery advice before running repairs.
2. Identify whether the file or app is the problem
Check the file name, extension and size in Finder’s Get Info window. Try opening a different known-good file of the same type in the same app. If only one file fails, look for an older copy. If every file of that type fails, update the app or test with another compatible app. Open a copy with a compatible viewer; do not overwrite the original just to test it.
A macOS message saying an application is damaged or cannot be verified is a different issue from a document that is corrupt. Do not bypass security warnings or change Gatekeeper settings to test an untrusted download; obtain the app from its publisher.
3. Restore an earlier version
If Time Machine was enabled, open the folder containing the file, browse backups and restore a version from before the problem. Some Mac apps also offer File → Revert To → Browse All Versions. If the file lives in iCloud Drive or another sync service, check that service’s version history or recently deleted area. Compare the restored copy before replacing the current one.
4. Check the disk when multiple files are affected
If several files fail, copy your data to another disk first. Open Disk Utility, choose View → Show All Devices, then follow Apple’s First Aid instructions for the affected volume, container and device. First Aid checks file-system structure; it does not rebuild the contents of an individually damaged document and cannot fix every disk problem. If Disk Utility warns that a disk is about to fail, back up what you can and replace the disk.
5. Use the Photos repair tool only for a Photos library problem
If the Photos library itself will not open or Photos behaves unexpectedly, back up the library before trying Apple’s Repair Library tool. Quit Photos, then open it while holding Option-Command and choose Repair. This is for a Photos library, not for an arbitrary JPEG, video or document.
When to stop
Stop if a drive is failing, First Aid reports unrepairable errors, or the only copy of a valuable file cannot be duplicated. Do not run random Terminal “header repair” commands against the original. A specialist may be able to recover data, but the outcome depends on the damage and the available backups.
Sources and scope
- Apple: Restore items with Time Machine — older copies and document versions.
- Apple: Repair a Mac storage device with Disk Utility — backup and First Aid sequence.
- Apple: Disk Utility First Aid — what it can and cannot repair.
- Apple: Repair your Photos library — library-specific procedure.
The safest path depends on the file type and drive condition. This article is based on Apple’s documentation; it does not claim recovery testing on a particular disk. Report an outdated step with your macOS version and exact error.