LCS AlgorithmLine NumbersTwo Views

How It Works

1

Paste Texts

Paste the original text on the left and the modified text on the right.

2

Compare

Click Compare to run the diff algorithm and highlight changes.

3

Review

See additions, deletions, and modifications with stats and line numbers.

Frequently Asked Questions

What algorithm does this tool use?
The tool uses the Longest Common Subsequence (LCS) algorithm to determine which lines were added, removed, or modified between the two texts.
What do the colors mean?
Green highlights indicate added lines (present only in the modified text), red highlights indicate removed lines (present only in the original text), and yellow highlights indicate modified lines (changed between the two versions).
Can I switch between views?
Yes. After comparing, toggle between Side by Side view (both texts shown in parallel columns) and Unified view (changes shown inline with +/- prefixes).
Share:

Love this tool? Explore 999+ more

Free online tools for images, PDFs, text, code, and more. All running in your browser.

Explore All Tools