Diff Checker

Comparison Input
Clear
What is Diff?

A diff compares two pieces of text and shows what was added, removed, or changed. It is the mechanism behind version control history, code review, and document comparison.

How Diff Works

Diff algorithms typically use techniques like Longest Common Subsequence (LCS) to find the minimal set of changes between two texts. Results show additions (new lines), deletions (removed lines), and modifications (changed lines). Advanced diffs can show character-level changes within modified lines.

Common Use Cases
  • Comparing code versions before merging
  • Reviewing configuration file changes
  • Validating document revisions
  • Debugging by comparing expected vs actual output
  • Tracking changes in data exports
Features
  • Side-by-side comparison view
  • Line-by-line difference highlighting
  • Added and removed line indicators
  • Character-level change detection
Frequently Asked Questions

What's the difference between unified and side-by-side diff?

Unified diff shows changes in a single column with +/- markers, more compact for patches. Side-by-side diff shows both versions in parallel columns, easier for visual comparison.

How can I ignore whitespace differences?

Most diff tools offer options to ignore whitespace changes. This is useful when comparing code with different formatting but identical logic.