Text Compare Tool

Paste two pieces of text below to see the differences highlighted line by line.

How the Text Compare Tool Works

This tool compares two pieces of text line by line and highlights the differences. Lines that were removed from the original appear in red, lines that were added in the modified version appear in green, and unchanged lines appear in gray.

Common Use Cases

How It Works Internally

The tool uses a longest common subsequence (LCS) algorithm to find the optimal alignment between two sets of lines. This produces a minimal diff that clearly shows what was added, removed, or stayed the same. The algorithm runs entirely in your browser, so your text is never sent anywhere.

Tips for Best Results

For the clearest diff, make sure both texts use the same line ending style. The tool works best with structured text like code, configuration files, or any text with natural line breaks. For prose, try putting each sentence on its own line before comparing.

More Free Text Tools