Text Tools

Text Compare Tool

Live

Compare two text blocks line by line and summarize added, removed, unchanged, and modified content.

About Text Compare Tool

Compare two text blocks line by line and summarize added, removed, unchanged, and modified content. Enter original text, revised text, ignore letter case, ignore surrounding whitespace in a purpose-built workspace that keeps related controls together and makes units explicit. A longest-common-subsequence diff aligns matching lines, then marks nonmatching lines as additions or removals and summarizes the edit counts. The result panel reports line similarity, added lines, removed lines, unchanged lines, line-by-line differences with copy-ready values and supporting context. The comparison is line-oriented. A moved line may appear as one removal and one addition, and semantic meaning is not evaluated. Processing stays in your browser and the entered values are not sent to UtilityPages.

Set up Text Compare Tool

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

Complete the fields to prepare a result.

Enter the original text.

Enter the revised text.

Turn ignore letter case on or off.

Turn ignore surrounding whitespace on or off.

Text Compare Tool results

Enter the values above, then compare text to see the result.

Text Compare Tool method

A longest-common-subsequence diff aligns matching lines, then marks nonmatching lines as additions or removals and summarizes the edit counts.

How it works

A longest-common-subsequence diff aligns matching lines, then marks nonmatching lines as additions or removals and summarizes the edit counts. The comparison is line-oriented. A moved line may appear as one removal and one addition, and semantic meaning is not evaluated.

Examples

Text Compare Tool example

Example input
{
    "original_text": "UtilityPages\nFast tools\nNo login required",
    "revised_text": "UtilityPages\nPrivate browser tools\nNo login required",
    "ignore_case": false,
    "ignore_whitespace": false
}
Expected result
{
    "similarity_percent": 66.67,
    "added_lines": 1,
    "removed_lines": 1,
    "unchanged_lines": 2,
    "diff": [
        {
            "type": "unchanged",
            "line": "UtilityPages"
        },
        {
            "type": "added",
            "line": "Private browser tools"
        },
        {
            "type": "removed",
            "line": "Fast tools"
        },
        {
            "type": "unchanged",
            "line": "No login required"
        }
    ]
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Frequently asked questions

How does the Text Compare Tool work?

A longest-common-subsequence diff aligns matching lines, then marks nonmatching lines as additions or removals and summarizes the edit counts.

What information should I enter in the Text Compare Tool?

Enter original text, revised text, ignore letter case, ignore surrounding whitespace. Use values from the same scenario and keep measurement units consistent with the labels shown.

What results does the Text Compare Tool provide?

The result workspace reports line similarity, added lines, removed lines, unchanged lines. Supporting values are included so the primary result can be checked and interpreted.

How exact is the Text Compare Tool?

The comparison is line-oriented. A moved line may appear as one removal and one addition, and semantic meaning is not evaluated.