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:

About Text Diff

What this tool does

Text and data tools count words, characters, sentences, and paragraphs, convert between upper/lower/title case, compare two texts side by side, and transform text in dozens of ways: reverse, sort, deduplicate, wrap, or pad.

Why use this tool

Writers need word counts for assignments, developers need text manipulation for data cleaning, and marketers need character limits for meta descriptions and ad copy. These tools provide instant answers without spreadsheets or scripts.

How it works

The tool parses your input string using JavaScript string methods and regular expressions, applies the selected transformation, and displays the result alongside useful statistics. No data is sent anywhere.

Pro tip

The word counter respects CJK characters and counts them individually, which is useful for content localized in Chinese, Japanese, or Korean where word boundaries differ from Latin scripts.

Love this tool? Explore 12467+ more

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

Explore All Tools