Text Diff (Inline & Side-by-Side)

Compare two text blocks with word- or character-level diff highlighting.

Ad placeholder (leaderboard)

A text diff highlights exactly what changed between two versions of a document — which words were added, which were removed, and which stayed the same. This free tool compares two blocks of text directly in your browser and shows the result inline with colour highlighting, plus a copy-ready unified diff for sharing.

How it works

The tool first splits each side into tokens. In word mode it splits on whitespace (keeping the spaces so formatting is preserved); in character mode it splits into individual characters. It then computes the longest common subsequence (LCS) between the two token lists — the longest ordered set of tokens that appears in both.

Walking that LCS table from start to finish produces three kinds of token:

  • equal — present in both, shown plainly.
  • remove — present only in the original, shown red and struck through.
  • add — present only in the modified text, shown green.

This is the same core idea behind git diff and most code-review tools.

Tips and example

  • Use word-level for essays, emails, and contracts so whole edited words light up rather than scattered letters.
  • Use character-level to catch a single transposed digit in a reference number or a one-letter typo.
  • The summary line shows counts like +3 added · -2 removed, a quick way to gauge how big a change is.

For example, comparing The quick brown fox with The quick red fox marks brown as removed and red as added, while The, quick, and fox stay unchanged. Copy the unified diff and you will see -brown and +red lines you can paste into a code review or change log.

Ad placeholder (rectangle)