Diff Checker
Compare two blocks of text and see the differences highlighted.
Paste original and modified text, then click Compare to see the differences.
What Is a Diff Checker?
A diff checker (short for "difference checker") is a tool that compares two blocks of text and highlights the differences between them. It shows which lines were added, removed, or left unchanged — making it easy to spot modifications at a glance. Diff tools are indispensable in software development, content editing, configuration management, and any workflow where tracking text changes matters.
How Diff Algorithms Work
At the core of every diff tool is an algorithm that finds the Longest Common Subsequence (LCS) between two sequences of lines. The LCS represents the lines that both texts share in the same order. Lines not in the LCS are classified as additions (present only in the modified text) or deletions (present only in the original text). This approach produces a minimal, human-readable set of changes — the same principle behind git diff and the Unix diff utility.
Common Use Cases
- Code review — Compare two versions of source code to see exactly what changed.
- Configuration auditing — Spot differences between production and staging config files.
- Document editing — See what was added or removed between revisions of a document.
- Debugging — Compare expected vs. actual output to identify discrepancies.
- Merge conflict resolution — Understand both sides of a conflict before choosing which changes to keep.
Unified Diff Format
This tool displays results in a unified diff format — additions are highlighted in green with a + prefix, deletions in red with a - prefix, and unchanged lines are shown for context. You can copy the diff output as text (with +/- markers) or export it as a .diff file compatible with standard patch tools. Everything runs in your browser — your text is never sent to any server.