A corrupted file is frustrating, but it is not always lost. This guide walks through methods that work, starting with the quickest. Success depends on how much damage occurred.
Step 1: Make a copy first
Never try repairs on your only copy. Duplicate the file and work on the duplicate.
Step 2: Check for backups and earlier versions
- Windows: right-click the file, then Properties > Previous Versions, or check File History.
- Mac: use Time Machine.
- Cloud storage: use version history in Google Drive, OneDrive or Dropbox.
- Email: an earlier attachment may be fine.
This is often the fastest and best fix.
Step 3: Try another program
A file that fails in one program may open in another. Try LibreOffice for documents, a different PDF reader, or VLC for video.
Step 4: Use built-in repair tools
Word and Excel: go to File > Open > Browse, choose the file, click the arrow beside Open and pick Open and Repair. In Word you can also pick Recover Text from Any File in the file type list.
PDF: try opening it in a browser, or run a repair with a tool such as qpdf or Ghostscript:
gs -o fixed.pdf -sDEVICE=pdfwrite broken.pdf
ZIP: use WinRAR's Repair option, or on Linux:
zip -FF broken.zip --out fixed.zip
Video: VLC can rebuild a broken AVI index when prompted. For MP4, FFmpeg can sometimes copy the intact streams:
ffmpeg -i broken.mp4 -c copy fixed.mp4
Images: open the file in an editor and re-save it, or use a different viewer. Partly damaged JPEGs often display up to the point of damage.
Step 5: Check the disk
If several files are damaged, your drive may be failing. Run chkdsk (Windows) or Disk Utility's First Aid (Mac) and back up everything else right away.
Step 6: Try recovery software
If the file was deleted or the drive was damaged, data recovery software may help. Stop using the drive first to avoid overwriting data.
Step 7: Ask for a fresh copy
If the file came from a download or email, download it again or ask the sender to resend it. Compare the file size or checksum with the original. See our guide on incomplete downloads.
When a file cannot be fixed
If the header is gone and no backup exists, recovery may not be possible. Damage in the middle often leaves partial data, while a missing header or index is harder to repair.
How to practice safely
If you are testing a repair tool, create a damaged sample with CorruptAnyFile and see if the tool fixes it. That way you know exactly what the damage was.
Prevent it next time
Read what corrupts a file and check the basics in what a corrupt file is.
FAQ
How do I uncorrupt a file? Try backups, another program, then the built-in repair tools.
Can all corrupted files be fixed? No.
Is online repair safe? Do not upload sensitive files to unknown services.