Text Diff Checker
Compare two texts side by side and highlight added, removed, and unchanged lines
About the Text Diff Checker
Our text diff checker compares two blocks of text line by line and highlights exactly what changed. It uses a Longest Common Subsequence (LCS) algorithm â the same core approach used by git diff â to produce an accurate, minimal diff between the two inputs.
How to Read the Diff Output
- + Green lines â Lines that exist in the modified text but not in the original (added)
- â Red lines â Lines that exist in the original but not the modified text (removed)
- Grey lines â Lines that are identical in both texts (unchanged)
Common Use Cases
- Code review â Spot changes between two versions of a file
- Document comparison â Find edits in contracts, articles, or documentation
- Configuration comparison â Identify changed settings between environments
- Log analysis â Compare log outputs between runs
- Content editing â Track changes in draft documents
Algorithm
The diff uses the Longest Common Subsequence (LCS) algorithm with dynamic programming, which finds the minimal set of line insertions and deletions to transform the original text into the modified text. This is the same algorithm underlying most version control systems including Git, SVN, and Mercurial.
Privacy
All comparison is performed entirely in your browser using JavaScript. Neither the original text, the modified text, nor the diff result is ever transmitted to any server. This makes it safe to use with confidential code, legal documents, or proprietary configurations.