Text Diff Checker

Paste an original and a changed version of any text — a contract clause, an article draft, a configuration file or code — to see exactly what was added, removed and changed. Changed lines show the individual words that differ.

Step-by-step guide: How to Compare Two Texts and Find the Differences

How to use the Text Diff Checker

  1. Paste the earlier version into Original text and the newer version into Changed text.
  2. Choose whether to ignore spacing or capitalisation differences. Ignoring spacing is useful when only indentation or line endings changed.
  3. Select Compare texts. Removed lines are marked with a minus sign and red background, added lines with a plus sign and green background.
  4. Where a line was edited rather than replaced, the exact words that changed are highlighted inside it.
  5. Download the comparison as a unified diff file if you need to share it or apply it with version-control tools.

Example: a revised policy paragraph

Comparing these two versions:

Original:  Refunds are available within 14 days of purchase.
Changed:   Refunds are available within 30 days of delivery.

The checker shows the line as removed and re-added, with “14” and “purchase” highlighted in the old line and “30” and “delivery” highlighted in the new one. In a long document, unchanged paragraphs are collapsed so you only read the parts that changed.

Why compare texts with a tool

Reading two versions side by side and spotting the differences by eye is slow and unreliable. A single changed number in a contract, a removed “not” in a policy or an altered setting in a configuration file is easy to miss. A diff tool compares every line systematically and draws attention to exactly what changed.

How the comparison works

The checker uses Eugene Myers’ O(ND) difference algorithm, the same approach used by Git and the classic diff utility. It finds the shortest sequence of line insertions and deletions that turns the original into the changed text, so it never reports more changes than necessary.

When a block of removed lines is directly followed by added lines, the lines are paired and compared again word by word, so you can see the precise edit inside a long line. The unified diff download uses the standard format with @@ hunk headers, readable by code-review tools and the patch command.

Who uses it

Editors reviewing a writer’s revisions, lawyers and contract managers checking redlines, developers comparing configuration files or API responses, translators checking what changed in a source text, and students comparing drafts.

Limitations to keep in mind

  • The comparison is line-based. If paragraphs were re-wrapped so line breaks moved, many lines will show as changed even though the words are the same — enable “Ignore differences in spacing” and put each paragraph on one line.
  • Moved blocks of text appear as a deletion in one place and an addition in another; moves are not detected separately.
  • For performance, each side is limited to 20,000 lines.
  • Only plain text is compared. Formatting changes in Word or PDF documents are not visible here.

How your data is handled

Both texts are compared in your browser. Neither version is uploaded, so the tool is safe for confidential drafts and contracts.

Frequently asked questions

Can I compare Word or PDF documents?

Copy the text from each document and paste it here. Formatting is not compared, only the words and line structure.

What does “3 lines of context” mean?

When unchanged lines are hidden, the three lines before and after each change are still shown so you can see where in the text the change is. Untick the option to show the full text.

Why is a whole line marked as changed when I only edited one word?

The comparison works line by line first, so an edited line appears as a removed line and an added line. The words that actually changed are highlighted within those lines.

Can I apply the downloaded diff to a file?

Yes. The .diff file uses the unified format, which the patch command and Git can apply, provided the original file matches the original text you pasted.