How does the diff algorithm work?
The comparison is line-based, using a longest common subsequence (LCS) algorithm implemented directly in JavaScript. Unchanged lines are matched, and everything else is marked as an addition or removal.
Text Tools
Compare two blocks of text and see additions and removals highlighted side by side. Everything runs locally in your browser.
Original Text
Changed Text
FAQ
The comparison is line-based, using a longest common subsequence (LCS) algorithm implemented directly in JavaScript. Unchanged lines are matched, and everything else is marked as an addition or removal.
Yes. Each side is limited to 1500 lines so the comparison stays fast in the browser without freezing the page.
No. The comparison runs entirely in your browser using JavaScript — neither text is sent to TripleW Tools or any server.