Diff Checker

Paste two versions of text or code to see exactly what changed, line by line.

Original
Changed

What is the Diff Checker?

A diff checker compares two pieces of text line by line and shows exactly what's different — which lines were added, which were removed, and which stayed the same. It's the same kind of comparison git shows for code changes, generalized to any text: contracts, config files, articles, two drafts of an email.

How to use it

  1. Paste the original text into the left box.
  2. Paste the changed version into the right box.
  3. Click "Compare."
  4. Added lines show in green with a +, removed lines in red with a -, unchanged lines are plain.
  5. Click "Edit again" to go back and compare something else.

How it works

The comparison uses the Longest Common Subsequence (LCS) algorithm — the same technique behind most diff tools, including git — to find the longest sequence of lines that appears, in order, in both texts. Everything not part of that shared sequence is marked as either added (only in the new text) or removed (only in the original).

This means a line moved to a different position but otherwise unchanged may show as a removal and an addition rather than a single "moved" marker — line-based diffing tracks content and order, not relocation specifically.

Example

Comparing two short paragraphs:

Hello World
- This is line two
+ This is line two, edited
A shared closing line

Frequently asked questions

Does this compare word by word or line by line?

Line by line — a single changed word within a line marks that whole line as changed (shown as a removed old line plus an added new line), rather than highlighting just the changed word.

Can I use this to compare code files?

Yes — paste the two versions of a file to see exactly what changed, the same way a git diff would show it.

Does it ignore whitespace differences?

No — a line that differs only in trailing spaces or indentation is still treated as changed, matching how most diff tools behave by default.

Is there a size limit?

Yes — each side is capped at 2,000 lines, since the comparison algorithm's cost grows with the product of both lengths.

Is my text sent anywhere?

No — the comparison runs entirely in your browser.