Skip to content
Main menu

Free text tool

Compare text

Paste an earlier version and a revised version to compare text line by line. The result shows unchanged, removed and added lines in order.

Comparison starts locally after JavaScript loads. If the controls stay disabled, enable JavaScript and reload this page.

Up to 20,000 JavaScript code units and 300 lines in each field. A trailing line break counts as a blank line.

Comparison mode

Comparison

Paste two texts and select Compare text.

Spaces and tabs are kept in the display. When lines match because of the whitespace option, both original lines are shown.

How to compare text

Paste the old version in the first box and the new one in the second, then select Compare text. The signs =, − and + mean unchanged, removed and added line. For example, if the first text contains “A” and “B” on separate lines and the second contains “A” and “C”, “A” is unchanged, “B” is removed and “C” is added.

  • An edited line appears as a removed and an added line.
  • Blank and repeated lines count. An empty input has no lines; an ending line break creates an empty final line.
  • Editing an input clears the old result. Select Compare text again to see the new result.

Method and limits

The tool finds a longest common sequence of whole lines. There can be more than one valid alignment, especially with duplicates. A moved line may therefore appear as a removal and an addition. Windows, Mac and Unix line endings are treated as line boundaries. In exact mode, case, punctuation, spaces, tabs and Unicode code units matter; visually identical Unicode variants are not normalized.

Each input is limited to 20,000 JavaScript code units and 300 lines to bound the work. An emoji may use more than one code unit. The whitespace option only affects spaces and tabs within each line; it does not join lines. Comparison runs locally in the tab, but browsers, extensions and devices have their own behavior, so this is not a guarantee of confidentiality.

Questions and answers

How do I compare two texts?
Paste the earlier text into the first field and the revised text into the second. Choose exact comparison or ignore spaces and tabs, then select Compare text. The result keeps lines in their original order.
Does this show changes to individual words or characters?
No. It compares whole lines. A changed line appears as one removed line and one added line, without word or character highlighting.
What happens to blank or duplicate lines?
Blank lines count as lines and appear as [blank line]. Repeated lines are matched in order, so the same text can appear more than once. A trailing line break creates a blank final line.
What does ignore spaces and tabs mean?
It ignores leading and trailing spaces and tabs, and differences in runs of spaces or tabs within a line. Line breaks, case and Unicode variants still count as differences. Both original lines appear when a whitespace difference was ignored.
Is the pasted text uploaded?
The comparison runs in your browser. The tool itself does not upload the pasted text. Avoid pasting confidential material on a device or in a browser you do not trust.