Select File A

Drag & drop or click

Select File B

Drag & drop or click

How File Compare Works

Two files are first compared by their SHA-256 hash values to determine if they are identical. For text files (.txt, .html, .css, .js, .json, etc.), a Beyond Compare style side-by-side view shows line-by-line differences with highlights. Binary files are compared by hash only.

Practical Example

Select two HTML files, config files, or backups to check whether they contain the same bytes. Text files can be reviewed line by line, while binary files can be checked quickly for exact equality.

Practical Use Cases

  • Pre-release verification: compare production upload candidates against CI artifacts.
  • Config audits: inspect environment-specific file differences quickly.
  • Review handoff: share file-level changes with non-IDE stakeholders.

Common Mistakes

  • Comparing files with different encodings and treating all diff lines as semantic changes.
  • Forgetting line-ending normalization (CRLF/LF), which can create noisy diffs.
  • Expecting line highlights for binary files; binary comparison is hash-only by design.

How to Interpret Results

  • Hash result tells whether full file bytes are identical.
  • Match/Changed/Added-Removed stats summarize text delta size.
  • Sync Scroll keeps both panels aligned for long diff reviews.

Which Comparison Tool Do You Need?

Three tools on this site answer "are these two things the same?" — the right one depends on what you have in hand.

SituationUseWhy
Verify a download against an official releaseFile hash generatorCompares against a published checksum string — no second file needed
Two files in hand; same? where do they differ?File compare (this tool)Hash settles identity first, then line-level diff for text files
Text snippets rather than filesText diffPaste-based, fastest for email bodies and code fragments

The deciding question is how many of the items you actually possess. Checksum string only: hash verification. Both files: this tool. Why a hash can prove tampering at all is covered in the file integrity guide.

Can Two Different Files Share a Hash?

For SHA-256, not in practice. No collision has ever been found, and no feasible attack is known — which is why this tool uses SHA-256 as its verdict. MD5 is different: deliberate collisions are practical, so it must not be used for security decisions. If hashes match, treat the files as identical; if even one byte differs, the hash changes completely (the avalanche effect).

FAQ

How does the tool decide text vs binary?

It uses extension-based heuristics and enables line diff view only for recognized text formats.

If hashes differ, does that guarantee content difference?

Yes for practical workflows. A different hash means file bytes are not identical.

Are uploaded files transmitted to a server?

No. File reading and comparison are executed locally in your browser.