Text Diff
Compare two blocks of text line by line and highlight additions, deletions and unchanged lines.
Diff result
Lines are aligned with a longest common subsequence algorithm, computed locally
How to use
- Paste the original text into "Original A" and the modified text into "Compare B".
- Optionally enable "Ignore case" or "Ignore whitespace", then click Compare.
- The result shows green added lines, red removed lines and grey unchanged lines, with a summary on top.
Frequently asked questions
How are differences computed?
A longest common subsequence (LCS) algorithm aligns the two lists of lines and produces a minimal set of additions and deletions — the same idea used by common code diff tools.
Is it suitable for code or config files?
Yes. Line-based comparison works well for code, configuration and name lists. Enable "Ignore whitespace" when indentation changes should not count as differences.
Is my text uploaded?
No. Comparison runs entirely in your browser, so contracts, source code and other sensitive text are safe to compare.
Privacy & data handling
This tool runs entirely in your browser. Text you type and files you choose are never uploaded to a server or saved by ToolNest. Closing the page removes everything.