Text Diff
Compare two texts line by line, with added / removed counts.
Paste an original on the left and a modified version on the right. We compute the line-level diff and show added lines in green, removed in red, unchanged in muted grey.
Unchanged
1
Added
3
Removed
2
Diff
- -The quick brown fox
- -jumps over the lazy dog
- +The slow brown fox
- +jumps over the lazy cat
- on a sunny morning.
- +New line at the end.
How to use it
Paste the original
Left pane. Samples are pre-loaded so you can see the output immediately.
Paste the modified version
Right pane.
Read the diff
Added lines marked '+' in green, removed '-' in red, unchanged in muted grey. Summary counts appear above.
What is it?
A text diff tool compares two versions of a text and highlights what changed. Most diffs work line by line, treating each line as an atomic unit - the algorithm finds the longest common subsequence of lines and labels the rest as inserts or deletes. It's the same engine that powers git diff and code-review tools.
When to use it
Comparing two drafts of an article. Spotting changes between an old and new contract. Reviewing what someone edited in a shared doc when there's no track-changes. Auditing a config file before deploy. Sanity-checking that a paste did not introduce stray invisible characters.
Common mistakes
Comparing texts with different line-ending styles (CRLF vs LF) - every line then appears as 'removed + inserted'. Pasting from a PDF where line breaks come from the layout, not the content. And expecting a word-level diff inside lines: this tool diffs at the line level only.
FAQ
- How is the diff computed?
- A standard longest-common-subsequence backtrack at the line level. The output is the minimal set of insertions and deletions to transform left into right.