Skip to content
Text & StringWorks offlineNew

Text Diff Checker

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

Case can only be ignored when comparing by word or character.

Original

Changed

Differences

Enter text in both panes to compare them.

Paste two versions of a text and see exactly what changed — additions highlighted, deletions struck through. Compare by line for code and documents, by word for prose, or by character to catch a single altered digit. Everything runs in your browser.

Choosing a comparison mode

The mode decides what counts as a unit of change, which changes what the result looks like.

  • Line — the standard for code, configuration and structured data. A changed line shows as one removal and one addition.
  • Word — best for prose. Editing one word in a paragraph highlights that word rather than reflowing the whole line.
  • Character — the finest grain. Use it to find a single transposed digit in a reference number or a swapped letter in an identifier.

Changes you cannot see

Some differences are real but invisible: a trailing space, a tab where spaces were expected, or Windows line endings against Unix ones. The text looks identical and the comparison still reports a change.

This tool says so explicitly when two inputs differ only in whitespace, rather than showing what appears to be an empty result. That case causes a disproportionate amount of confusion — it is behind a great many "but they look the same" bug reports.

How the comparison works

The underlying algorithm finds the longest common subsequence of the two texts — the largest set of units appearing in both, in the same order. Everything outside it is an addition or a deletion.

This is the same principle behind git diff, so the output should feel familiar. It also explains a quirk worth knowing: a block of text that was moved rather than edited shows as a deletion in one place and an addition in another, because the algorithm tracks order, not identity.

FAQ

Is my text uploaded anywhere?

No. The comparison runs entirely in your browser, so contracts, code and unreleased copy are all safe to paste. Nothing is transmitted, logged or stored.

Why do the texts look the same but still show differences?

Almost always whitespace: a trailing space, a tab instead of spaces, or CRLF against LF line endings. When that is the only difference, this tool tells you so rather than leaving you to hunt for it.

Can I compare files rather than pasted text?

Not yet — paste the contents into the two panes for now. File input is on the roadmap.

Why is moved text shown as deleted and added?

The algorithm compares sequences in order, so it has no concept of a block being relocated. Text that moved is genuinely absent from its old position and present in a new one, and that is what gets reported.

Related tools