Text Diff
Compare two texts line by line. Removed lines show red, added lines green, unchanged lines dimmed — with a change summary.
How to use
- Paste the original text on the left, the changed version on the right.
- Click Compare — the diff appears below with color coding and a summary of additions and removals.
- Swap sides flips the two inputs if you pasted them the wrong way around.
Frequently asked questions
How does the diff algorithm work?
This tool computes the longest common subsequence (LCS) of the two line sequences, then everything not in the common subsequence is reported as removed from the first text or added in the second. It is the same core idea used by the classic diff utility.
Is it safe to paste confidential text?
Yes. The comparison runs entirely in your browser with JavaScript — nothing is uploaded. You can confirm this yourself by watching the network tab while comparing.
How large can the inputs be?
Up to 2,000 lines per side, which covers emails, configs, code reviews and most documents. Beyond that the LCS matrix gets expensive in the browser; use a desktop diff tool for very large files.