Text & Productivity

Text Difference Checker

Compare two versions of a text and see exactly what changed. Additions, removals and modified lines are highlighted, with a summary of how many of each. Options let you ignore case, whitespace or line-ending differences so you focus on the changes that matter. Both texts stay in your browser — nothing is uploaded.

How to use this tool

  1. Paste the original text into the first box and the changed version into the second.
  2. The differences appear immediately, line by line.
  3. Lines only in the original are marked as removed; lines only in the changed text are marked as added.
  4. Use the ignore options to overlook case, surrounding whitespace or line-ending differences when they are not what you care about.
  5. Read the summary for a count of additions, removals and modifications, and copy the diff if you need to share it.

The formula

The checker finds the longest common subsequence of lines between the two texts — the largest set of lines that appear in the same order in both. Lines outside that sequence are the changes: those only on the left were removed, those only on the right were added.

lcs = longest sequence of lines common to both, in order removed = original lines not in lcs added = changed lines not in lcs modified = a removal immediately followed by an addition
subsequence
Items kept in order but not necessarily adjacent
LCS
Longest common subsequence — the standard basis for diff tools
modified
A changed line, shown as a paired removal and addition

Comparison is line by line, which suits prose, code and configuration. A change within a line is reported as that whole line being replaced.

Worked examples

A single word changed

Given
“jumps over” vs “leaps over” on one line
Result
1 modified line

The line differs, so it appears once as removed and once as added — counted together as a single modification in the summary.

A line added at the end

Given
The changed text has one extra final line
Result
1 added line

Every earlier line matches, so only the new final line is highlighted as an addition.

Whitespace-only differences

Given
Same text, but one version has trailing spaces, with “ignore whitespace” on
Result
No differences

With whitespace ignored, the comparison keys match, so the checker reports the texts as identical despite the invisible spaces.

Frequently asked questions

Line by line. Each line in the original is matched against the changed text as a whole unit, which works well for documents, code and config files. If a single word in a line changes, the whole line is shown as modified rather than just the word.

When a line is removed and a different line takes its place at the same point, the summary counts that pair as one modification rather than a separate deletion and insertion. The line still appears twice in the view — once as removed, once as added — so you can see both versions.

Ignore case when capitalisation changes are not meaningful. Ignore whitespace when indentation or trailing spaces differ but the content does not. Ignore line endings — on by default — when one text uses Windows line breaks and the other uses Unix, which would otherwise mark every line as changed.

Yes. Line-by-line comparison is exactly how source-control diffs work, so it suits code and configuration well. For very large files the comparison still runs in your browser, though extremely long inputs may take a moment.

Completely. Both texts are compared in your browser using an algorithm running on your own device. Nothing is sent to a server, there is no account, and closing the page discards everything.

Usually an invisible difference: a trailing space, a tab versus spaces, or a different line ending. Turn on “ignore whitespace” or “ignore line endings” to confirm — if the difference disappears, that was the cause.