DataToolsLab
Text Tools

Text Diff Checker

Compare two blocks of text and see exactly what was added, removed or changed.

Loading tool…

What is Text Diff?

The Text Diff Checker compares two blocks of text and highlights exactly what was added, removed or changed — at line or word granularity — using a Myers-style diff algorithm (the same class of algorithm underlying git diff).

How it works

Both inputs are diffed client-side with the `diff` library. Line mode shows whole lines with +/− markers; word mode re-diffs changed hunks word-by-word for fine-grained highlighting. Removals are shown with strikethrough, additions with a highlight, and a +/−/~ summary counts the changes.

  1. Paste both versions. Paste the original text on the left and the modified text on the right.
  2. Choose granularity. Line-level shows whole-line changes; word-level highlights the exact words that changed inside a line.
  3. Read the diff. The +/−/~ counters summarize the change, and each changed line is highlighted with markers that don't rely on color alone.

Examples

Document revision

Compare two drafts of a contract or article to see exactly which sentences were edited, added or removed.

Config comparison

Paste two versions of a config file to spot the changed settings without a version-control client.

Common mistakes

Whitespace-only changes

Line-level diff treats trailing whitespace changes as real changes. If your files differ only in formatting, use a formatter first.

Very large documents

Diffs of tens of thousands of lines can be slow on the main thread — for enormous files, split the input.

Alternatives

JSON Diff

Structural diff for JSON documents — ignores whitespace and key order.

CSV Diff

Row-aware comparison of CSV files matched by a key column.

Frequently asked questions

Is my text uploaded?

No. Diffs are computed entirely in your browser — important when comparing confidential drafts.

What's the difference between line and word granularity?

Line mode marks whole lines as added/removed/changed. Word mode drills into changed lines and highlights the exact words that differ.

Online