Text Diff Checker

Compare two texts and see exactly what changed — line by line or word by word.

Runs in your browserUpdated Built and maintained by Leon and Henrik

Paste two versions of any text and see exactly what changed — line by line or word by word, all in your browser. Free. No sign-up. Runs in your browser, nothing is uploaded.

Text Diff Checker
Compare by
+0 added−0 removed

Differences

Paste text into both boxes — the differences will be highlighted here.

Both texts are compared locally in your browser. Nothing is uploaded.

Runs in your browser
Nothing is uploaded

Paste the original on the left and the new version on the right: everything that was added turns green, everything that was removed turns red with a line through it, and the rest stays plain. A counter above the result tells you how many lines (or words) went in and out, so you know at a glance whether you're looking at a typo fix or a rewrite. Click Sample to see it on a short example first.

Line mode or word mode?

The switch at the top changes what counts as one unit of change. Pick by what you're comparing:

You're comparing…UseWhy
Code, config files, CSV rows, logsLineLine breaks carry meaning, and you want to know which lines changed
Contracts, articles, emails, essaysWordOne changed word is highlighted alone instead of flagging the whole paragraph
A list where items were added or deletedLineEach item stays one clean unit
A paragraph someone re-wrapped or re-spacedWordWhitespace differences are ignored in word mode
Two values that "should be identical"Line firstIt is strict about spaces, so it catches invisible differences

In the built-in sample, line mode marks the whole first sentence as replaced; word mode pinpoints the two words that actually changed — "brown" became "red", "jumps" became "leaps". If a result looks noisy, flip the mode: the same edit often reads much more clearly the other way.

Why identical-looking lines show up as changed

In line mode, two lines are equal only if every character matches. The usual invisible culprits:

  • A trailing space or tab at the end of a line, often left by copy-pasting from a PDF or spreadsheet.
  • Tabs versus spaces in indented code — they look the same on screen.
  • The very last line. If one text ends with a line break and the other doesn't, the last line is treated as different even though the words match.
  • Upper and lower case. The comparison is case-sensitive in both modes.
  • Look-alike characters, such as a non-breaking space, curly quotes instead of straight ones, or an en dash instead of a hyphen.

If you only care about the words, switch to word mode, which ignores whitespace. If duplicated lines are adding noise, clean them out first with remove duplicate lines. In word mode, punctuation marks are separate tokens, so changing a full stop to a comma shows as its own small edit rather than changing the whole word.

What the counts and the copied diff contain

The + added / − removed figures count lines in line mode and words in word mode, never characters. A replaced line therefore shows as +1 and −1.

Copy diff gives you plain text you can paste into an email, ticket or commit message, in a format that depends on the mode:

  • Line mode prefixes each line unified-diff style: + for added, - for removed, two spaces for unchanged.
  • Word mode keeps the text inline and wraps changes in markers: [-brown-]{+red+} means "brown" was removed and "red" inserted.

Swap sides exchanges the two boxes, which flips every addition into a removal — handy when you pasted them the wrong way round. For a full word or character total of either version, use the word & character counter.

Moved paragraphs and other diff surprises

A diff answers one narrow question: what is the smallest set of insertions and deletions that turns the original into the new version? It works by finding the longest sequence of lines (or words) the two texts share in the same order — the longest common subsequence — and marks everything outside it as added or removed.

That explains the results that seem odd at first:

  • A moved block appears as a deletion in one place and an addition in another, because "move" isn't an operation the algorithm knows.
  • A red block followed directly by a green block almost always means replaced, not two separate edits.
  • A lone green block at the end means text was appended.
  • Two completely different texts produce a wall of colour that tells you little. A diff is most useful when the versions are mostly the same and you're hunting the handful of real changes.

Where a quick diff saves time

  • Before committing code: paste the old and new function to confirm there are no stray edits outside the change you meant.
  • Contract rounds: in word mode a changed date, amount or notice period stands out instead of hiding in a "changed paragraph".
  • "Works on staging, breaks in production": diffing two config files or two API responses usually surfaces the single differing value.
  • Checking a re-typed value against its source: a transposed digit in an IBAN or order number shows up immediately.

Frequently asked questions