All posts
Productivity7 min read

How to repair a corrupted file on a Mac: video, PDF, and ZIP

A calm order of operations for a damaged file on macOS: protect the original, find an older copy, then repair video, PDF, ZIP, and Office files by type.

A raccoon at a workshop bench lifts intact pages out of a water-stained folio into a clean new folder tagged 34 of 41.
Key takeaway

Most “corrupted” files are not destroyed. Usually one structure is broken, such as a video’s index or a PDF’s cross-reference table, and the data after it is still readable. Copy the file before you touch it, look for an older good version first, then repair by file type and keep the original untouched. Some damage is permanent, so the honest goal is to recover everything that survived.

The video from the ceremony will not play. The signed contract opens to a blank page. The ZIP you downloaded says it is damaged. The instinct is to try every fix at once, which is how a recoverable file becomes an unrecoverable one.

This guide is the order to work in on a Mac. It starts with the steps that cost nothing and cannot make things worse.

First, protect the original

  1. 1Duplicate the file (select it in Finder and press Command-D) and work only on the copy.
  2. 2Do not save over it. If an app offers to “repair” and save in place, decline until you have a copy.
  3. 3Stop writing to the disk if the file lived on a camera card or external drive that might be failing. Copy the card to your Mac first, then work from there.

Check whether it is really corrupted

A file that will not open in one app is often fine in another. Try a second opener before assuming damage.

  • Video: if QuickTime refuses, try VLC or IINA. They tolerate codecs and small errors that QuickTime rejects.
  • PDF: if Preview shows blank pages, open it in a browser such as Safari or Chrome, which use different PDF engines.
  • ZIP: if Archive Utility fails, try unzip -l file.zip in Terminal to list what it can still see.
  • Office files: a .docx or .xlsx that Pages or Numbers cannot open may still open in Word, Excel, or LibreOffice.

Look for an older good copy

Restoring a healthy version always beats repairing a broken one. Check these before any repair tool.

  • Time Machine: open the folder in Finder, enter Time Machine, and step back to a version from before the problem.
  • Versions: documents edited in Preview, Pages, Numbers, Keynote, and TextEdit keep history under File > Revert To > Browse All Versions.
  • The source: the original email attachment, the camera card, the phone that recorded it, or the cloud folder it synced from.
  • The sender: for a damaged download or shared file, asking for it again takes a minute.

Why files break, and what that means for repair

The cause tells you what kind of damage to expect. An interrupted write usually leaves the content intact with a broken or missing structure. A failing disk can leave real holes in the data.

What happenedRecording stopped by a dead battery or a crash
What usually survivesThe video and audio frames, but not the index a player needs
What happenedDownload or copy interrupted
What usually survivesEverything up to the cut, so a partial file is often recoverable
What happenedSync conflict or app crash while saving
What usually survivesMost of the document, with a damaged table of contents
What happenedFailing drive or card
What usually survivesUnpredictable; some blocks are gone and no software can invent them

How to repair each file type

Video: MP4, MOV, and MKV

An MP4 or MOV cut off mid-recording usually has all its frames but no index (the moov atom) telling a player where they are. A repair tool rebuilds that index from the frames on disk. Open-source tools such as untrunc do it by borrowing the structure of a healthy reference video from the same camera and settings, so record a short test clip on the same device if you need one.

PDF

A PDF keeps a cross-reference table that maps every object. When it breaks, viewers show blank or missing pages even though the page content is still in the file. If a browser opens it, use Print > Save as PDF to write a clean new file. If none open it, a repair tool can rebuild the table and then check page by page what is still readable.

ZIP, DOCX, XLSX, and EPUB

These are all ZIP archives inside. A damaged archive often loses its central directory at the end while the individual entries are still intact. In Terminal, zip -FF broken.zip --out fixed.zip asks Info-ZIP to rebuild the archive from the entries it can find. For a .docx or .xlsx, rename a copy to .zip after the fix to inspect what was recovered.

Photos, subtitles, and text

A truncated JPEG often still shows the top part of the image. Text, CSV, and subtitle files usually suffer from encoding problems rather than true damage: garbled accents or broken cue timings that can be fixed without losing content.

Manatee: recover what survived, on your Mac

Manatee opens damaged video, PDFs, archives, photos, and documents on your Mac and writes out everything it can still read as a new file beside the original, which it never touches. It tells you how much came back, such as 34 of 41 pages or 212 of 240 archive entries, so a partial recovery is a clear result rather than a surprise.

Each file type goes to a matching engine: video gets its index rebuilt, PDFs get their cross-reference table repaired and every page checked, and ZIP-based files are rebuilt from the entries still on disk. Nothing is uploaded. You can preview the fix for free and pay $9 once to save it. It runs on macOS 12 or later, on Apple silicon and Intel.

Be careful with upload-based repair sites

Online repair services ask you to upload the file. For a family video, a signed contract, or a client archive, that means sending private data to a server you know little about. Prefer tools that run locally, and read the privacy terms of any service before you upload.

If several unrelated files are suddenly damaged, the file is not the problem. Run First Aid in Disk Utility, copy everything important off the drive, and consider a professional recovery service before writing anything else to it.

Frequently asked questions

Can a corrupted file be fixed?

Often, yes. Most damage is a broken structure, such as a missing video index or PDF cross-reference table, and the content after it is intact. Bytes that were never written or were lost on a failing disk cannot be recovered by any software.

Why won’t my MP4 play on my Mac?

Either QuickTime does not support its codec, which VLC or IINA will reveal, or the recording was interrupted and the file has no index. A missing index can usually be rebuilt.

How do I repair a corrupted ZIP file on a Mac?

Work on a copy, then run zip -FF broken.zip --out fixed.zip in Terminal, or use a repair app that rebuilds the archive from the entries still on disk.

Will repairing a file overwrite the original?

It should not. Use tools that write a new file, and always duplicate the original first so a failed attempt cannot make things worse.

Built a tool that rescues people’s work?

Launch it on DanielLaunches and keep a permanent product page with real visitor and click numbers.

Get my roadmap

Sources