Diff Checker

Compare two texts line by line — additions in green, removals in red.

How to compare two texts

  1. Paste the original version into the left box and the changed version into the right box.
  2. Click Compare.
  3. Read the unified result below: removed lines are highlighted red with a minus, added lines green with a plus, and unchanged lines stay grey. Above the diff, three counters summarize how many lines were added, removed, and untouched.

A worked example

Suppose a client returns your three line delivery terms with edits. Original:

Delivery within 14 days.
Payment due on receipt.
Returns accepted for 30 days.

Changed:

Delivery within 21 days.
Payment due on receipt.
Returns accepted for 30 days.
Late fees apply after 60 days.

Compare, and the stats read 2 added, 1 removed, 2 unchanged. The 14 day line shows in red, the 21 day line in green directly after it, and the brand new late fees line appears in green at the bottom. That red-then-green pair is how any edited line appears: the diff works on whole lines, so a one word change reads as the old line removed and the new line added, which is actually easier to proofread than inline highlighting when the stakes are contractual.

The algorithm, briefly

The tool computes a longest common subsequence over the lines of both texts, the same core idea underneath git diff. The LCS answers one question: what is the largest set of lines, in order, that both versions share? Everything outside that set is an addition or a removal, which is why the diff never falsely pairs unrelated lines just because they sit at the same position. The comparison runs entirely in your browser, and the output escapes HTML, so diffing code that contains angle brackets renders literally instead of executing. Both properties matter if you are comparing contracts or unreleased source: nothing is transmitted, and nothing you paste can act on the page.

Honest limitations

The LCS table costs memory proportional to the product of the two line counts, so the tool refuses pairs beyond about 4 million cell comparisons, roughly two 2,000 line documents, and tells you to compare smaller sections instead. It is line based only: there is no word-level or character-level highlighting inside a changed line, no option to ignore whitespace or letter case, and reformatting that rewraps every paragraph will light up the whole document as changed even when the words are identical. For prose, a practical workaround is to put one sentence per line before pasting both versions, which makes the line-level diff behave almost like a sentence-level one.

Frequently asked questions

How does the comparison work?

The tool computes a longest-common-subsequence diff over lines, the same core approach used by git. Lines present only in the new text show as additions, lines missing from it show as removals.

Is my text uploaded anywhere?

No. Both texts are compared with JavaScript in your browser and are never transmitted or stored.

Can I compare code or contracts?

Yes — anything line-based works well: code, contracts, essays, configuration files. For word-level changes inside a line, the changed line simply shows as one removal plus one addition.