Home › Text Diff Checker
Text Diff Checker
Paste an original and a changed version to see which lines or words were added or removed, with counts and a similarity score.
Results
- Added
- 2
- Removed
- 1
- Unchanged
- 3
- Similarity
- 60 %
redgreenbluevioletyellowblackHow it works
The texts are split into lines or words and the longest common subsequence is computed: the largest set of items that appear in both, in the same order. Items outside that set are reported as removed from the first text or added in the second. Ignoring case or extra spaces only affects the comparison; the output still shows your original text.
Rules and details
Added = items only in the changed text; Removed = items only in the originalUnchanged = length of the longest common subsequenceSimilarity = unchanged ÷ max(items in A, items in B) × 100Limit: the product of the two sizes must stay under 4,000,000
Worked example
Comparing two colour lists line by line gives 2 added, 1 removed and 3 unchanged lines, a similarity of 60 %. Here blue was replaced by violet and a new last line, black, was added.
Frequently asked questions
What is the difference between line and word mode?
Line mode marks whole lines, like a code review. Word mode marks individual words inside a paragraph, which suits prose and long single-line strings.
Why does moving a block show as removed and added?
The comparison finds the longest shared order. A block moved elsewhere cannot be part of that order, so it appears once as removed and once as added.
Is there a size limit?
Yes, to keep the page responsive: the number of lines (or words) in the first text multiplied by the number in the second must stay under four million.
Tips
- Format both JSON documents with sorted keys first to compare their content rather than their order.
- Use “Ignore extra spaces” when indentation changed but the code did not.
- For long files, compare a section at a time.