Skip to main content
Universal DiagnosticVerified for Windows 11/10, macOS Sonoma, Linux & Mobile

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 & Private

Inspect 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.

Select File from Computer
Don't have a broken file? Try an interactive simulated scenario:

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 file is corrupt and cannot be opened"
"CRC failed in file or checksum mismatch"
"Unexpected end of file (EOF)"
"File header is invalid or unreadable"
AnyFileX Intelligence Framework

The 4-Stage Diagnostic Resolution Pipeline

1Problem

Application reports file corruption or unexpectedly crashes during parsing.

2Analyze File

Check for zero-byte size, verify header magic bytes, check for required trailer/EOF markers, and calculate SHA-256 integrity hash.

3Identify Cause

Truncated download, storage drive bit rot, or application crash during write operation.

4Recommended Action

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)

Interrupted File Transfers

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).

Storage Drive Bit Rot & Bad Sectors

Failing SSD flash cells or magnetic hard drive platter degradation corrupt individual data sectors, altering binary checksums.

Application Crashes During File Save

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

  1. Load the file into the AnyFileX File Analyzer.
  2. Check the 'Header Integrity' test and the 'Truncation Detection' flag.
  3. Generate SHA-256 and MD5 hashes via the Checksum Verifier.
Look for: Whether the file possesses intact start and end markers, or if it is truncated to 0 bytes.

Checksum Comparison

  1. Obtain the official SHA-256 hash from the download provider.
  2. Paste the hash into AnyFileX Checksum Verifier alongside your downloaded file.
Look for: A green 'Hashes Match' confirmation indicating 100% bit-for-bit integrity.

Step-by-Step Resolution Workflows

Choose your operating system to view tailored fix instructions.

Standard File Integrity Audit Checklist

  1. 1Check File Size: If 0 bytes, the data is completely missing and cannot be repaired.
  2. 2Check Magic Bytes: Verify if the file starts with the correct signature bytes.
  3. 3Check File Trailer: Verify if container-specific closing markers exist (e.g. `50 4B 05 06` for ZIP, `%%EOF` for PDF).
  4. 4Test Alternative Parsers: Open the file in robust fault-tolerant software (such as VLC for video or 7-Zip for archives).
AnyFileX Measurable Diagnostic Statement

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.
Security Distinction: Integrity verification confirms whether file bytes are intact and match expected formats. It does not scan for malicious payload execution.
Connected AnyFileX Tools & Utilities
File Analyzer & Integrity Engine

Inspect raw container bytes, header health, and truncation status.

Launch Tool Now
Checksum & Hash Verifier

Compute and verify SHA-256, MD5, and SHA-1 checksums instantly.

Launch Tool Now
Repair Center

Explore step-by-step repair guides for ZIP, PDF, HEIC, PSD, and DWG.

Launch Tool Now

Related File Format Specifications

Related Troubleshooting Guides

Why Is My ZIP File Not Opening? Causes & Repair Solutions
Why Is My PDF Not Opening? Diagnostic & Repair Guide
Why Won't My File Open? The Complete Diagnostic Guide

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.