Text Diff Checker

Two versions of the same document can look almost identical and still hide important differences: a changed price, a corrected date, a deleted paragraph, or a single word that reverses the meaning of a sentence. Reading both versions side by side and hunting for those changes by eye is slow, tiring, and unreliable, especially when the text is long. This free text diff checker does the comparison for you in seconds. Paste the original text into Text A and the new version into Text B, click Compare, and every line is matched up: lines that stayed the same appear plain, lines that were deleted from the first version are highlighted in red, and lines that were added in the second version are highlighted in green. You also get simple counts of added, removed, and unchanged lines, so you can see at a glance how much actually changed. Writers use it to review edits, teachers use it to check revised essays, developers use it to compare configuration files, and anyone who works with contracts or policies uses it to catch changes they might otherwise miss. All of the comparison happens in your browser, so both texts stay private.

Your Comparison Results

—

Added lines (only in Text B)—
Removed lines (only in Text A)—
Unchanged lines—

All processing is client-side: text never leaves the browser.

Advertisement space — AdSense ads will appear here after approval.

How to Use

  1. Paste the original text into Text A and the revised text into Text B. The sample lists are already there so you can try the tool right away.
  2. Click Compare to run the line-by-line comparison. The results update below the buttons.
  3. Read the colored lines: green lines were added in Text B, red lines were removed from Text A, and plain lines are the same in both texts.
  4. Check the counts for added, removed, and unchanged lines, and use Copy Diff Summary if you need a plain-text record of the differences.

This tool compares whole lines, which is the right level of detail for most jobs: a changed line stands out clearly, and a block of added or removed lines is easy to scan. It is worth knowing one limit, though. If a single word changes inside a very long paragraph that sits on one line, the whole line will show as removed and added, not just the one word. When that happens, split long paragraphs into shorter lines before comparing, or compare the changed section on its own. Also remember that the comparison is exact: a line with an extra space or a different capital letter counts as changed, which is usually what you want when you are checking a contract or a piece of code.

Worked Example

Text A: "apple", "banana", "cherry" (one fruit per line).

Text B: "apple", "blueberry", "cherry" (one fruit per line).

Output: 1 added line ("blueberry"), 1 removed line ("banana"), and 2 unchanged lines ("apple" and "cherry").

The comparison matches "apple" in both texts, then finds that "banana" appears only in Text A and "blueberry" appears only in Text B, then matches "cherry" in both. That is exactly what a longest common subsequence comparison should do: it keeps the shared lines in order and reports everything else as an addition or a removal. If the two texts were identical, every line would be unchanged and both added and removed counts would be zero. If Text B were empty, every line of Text A would be removed. Try the sample above and you should see the same result: 1 added, 1 removed, 2 unchanged.

Frequently Asked Questions

How does a text diff checker work?

It splits both texts into lines and matches the lines they share, using a longest common subsequence comparison. Lines that appear only in the first text are marked removed, lines only in the second are marked added, and shared lines are unchanged.

What do the colors in the diff mean?

Green lines appear only in Text B, so they were added. Red lines appear only in Text A, so they were removed. Plain grey lines appear in both texts and did not change.

Can I compare two versions of a document?

Yes. Paste the older version into Text A and the newer version into Text B, then click Compare. Every changed, added, or deleted line is highlighted, which makes it easy to review edits before publishing.

Does the diff checker notice changes inside a line?

This tool compares whole lines, so a line with even one changed word counts as one removed line and one added line. For very long lines, split the text into shorter lines first to see differences more precisely.

Is my text private when I use this diff checker?

Yes. This tool runs entirely in your browser and your text is never uploaded, stored, or shared. You can compare private drafts, code, and documents without sending them anywhere.

Disclaimer: This tool runs entirely in your browser. Your text is never uploaded or stored.