🔍 DiffTool
Compare text side by side
Texts are identical
Original
Modified
1
1
Understanding Text Diffs
Text diff algorithms date back to the 1970s with the longest common subsequence (LCS) problem, first solved by Hunt and McIlroy for the Unix diff command. Modern diff engines like those in Git use the Myers diff algorithm (1986), which finds the shortest edit sequence in O(ND) time where N is the text length and D is the number of differences.
A well-written diff is the foundation of code review, document versioning, and collaborative editing. Google Docs, VS Code, GitHub PRs — all built on diff algorithms.
- Line-by-line diff (shown here) is the standard for source code comparison
- Word-level diff highlights individual changed words within lines — more granular
- Character-level diff is used by spell checkers and real-time collaborative editing