How to Check if a File Is Corrupted or Broken
A forensic approach to testing file integrity, verifying checksums, and finding missing headers without risking data loss.
AnyFileX File Intelligence Diagnostic Engine
100% Local & PrivateInspect magic bytes, detect extension mismatches, and verify structural integrity in real-time.
Drop Any Problematic File Here for Instant Diagnosis
Files are analyzed entirely inside your browser memory using WebAssembly. No data is ever uploaded to external servers.
Problem Overview
File corruption occurs when stored binary data is altered, truncated, or overwritten by hardware failures, incomplete downloads, or software crashes. Knowing whether a file is recoverable requires checking header signatures, EOF markers, and hash checksums.
Recognized Error Messages & Dialogs
The 4-Stage Diagnostic Resolution Pipeline
Application reports file corruption or unexpectedly crashes during parsing.
Check for zero-byte size, verify header magic bytes, check for required trailer/EOF markers, and calculate SHA-256 integrity hash.
Truncated download, storage drive bit rot, or application crash during write operation.
If header is missing but body intact, repair header; if checksum matches official distributor, re-download; if 0 bytes, recover from backup.
Why This Happens (Root Cause Analysis)
Network drops or disconnecting USB drives before cache flushing leaves files without essential ending markers (e.g. missing %%EOF on PDF or missing Central Directory on ZIP).
Failing SSD flash cells or magnetic hard drive platter degradation corrupt individual data sectors, altering binary checksums.
If an app crashes while saving, the temporary file may overwrite the original with an incomplete byte stream.
How to Confirm the Diagnosis
Integrity & Hash Verification via AnyFileX
- Load the file into the AnyFileX File Analyzer.
- Check the 'Header Integrity' test and the 'Truncation Detection' flag.
- Generate SHA-256 and MD5 hashes via the Checksum Verifier.
Checksum Comparison
- Obtain the official SHA-256 hash from the download provider.
- Paste the hash into AnyFileX Checksum Verifier alongside your downloaded file.
Step-by-Step Resolution Workflows
Choose your operating system to view tailored fix instructions.
Standard File Integrity Audit Checklist
- 1Check File Size: If 0 bytes, the data is completely missing and cannot be repaired.
- 2Check Magic Bytes: Verify if the file starts with the correct signature bytes.
- 3Check File Trailer: Verify if container-specific closing markers exist (e.g. `50 4B 05 06` for ZIP, `%%EOF` for PDF).
- 4Test Alternative Parsers: Open the file in robust fault-tolerant software (such as VLC for video or 7-Zip for archives).
Objective Integrity Assertions
- SHA-256 / MD5 cryptographic integrity checksum calculated.
- Structural container headers and tail markers analyzed for byte truncation.
- File size verified against standard non-zero allocation thresholds.
Inspect raw container bytes, header health, and truncation status.
Compute and verify SHA-256, MD5, and SHA-1 checksums instantly.
Explore step-by-step repair guides for ZIP, PDF, HEIC, PSD, and DWG.
Related File Format Specifications
Related Troubleshooting Guides
Frequently Asked Diagnostic Questions
Can a 0-byte file be recovered?
No. A file showing 0 bytes contains zero data blocks on disk. You must recover it from a backup, cloud revision history, or re-download the source file.
What is a CRC error?
A Cyclic Redundancy Check (CRC) error means the mathematical checksum calculated from the extracted data does not match the checksum stored in the file header, indicating corrupted bits.