How to Use This Tool
- Paste your original text into the "Original" textarea on the left.
- Paste the modified version of the text into the "Modified" textarea on the right.
- Click "Compare" to run the comparison.
- Lines highlighted in green are additions, lines in red are deletions, and uncolored lines are unchanged. Statistics at the top show the total counts.
Common Use Cases
- Reviewing what changed between two versions of a configuration file or environment variable file.
- Comparing two drafts of a document or article to see which sentences were added or removed.
- Identifying differences between two similar API responses to debug unexpected behavior.
- Checking that a code change only modified the intended lines and did not introduce unrelated changes.
- Comparing two translations of a text to spot omissions or additions.
Frequently Asked Questions
What algorithm is used for the diff?
The tool uses a pure JavaScript implementation of the Longest Common Subsequence (LCS) algorithm, the same foundational approach used by Unix diff, Git, and most professional diff tools.
Does the tool compare word-by-word or line-by-line?
The comparison is line-by-line, which is the most intuitive for text and code. Each line is classified as added, removed, or unchanged based on its presence in the original and modified inputs.
Whyshow stats at the top?
The stats panel (lines added, removed, unchanged) gives you a quick summary of how much has changed without reading the entire diff — useful for gauging the scale of edits at a glance.
Is there a size limit on the input?
There is no hard limit, but the LCS algorithm has O(n×m) time and memory complexity. Comparing two very long texts (thousands of lines each) may cause a brief pause in the browser.