Toolman

Text Diff Checker

Paste the original on the left and the changed version on the right. Differences are computed in your browser — nothing is uploaded.

How a diff is computed

The comparison uses the classic longest common subsequence algorithm — the same idea behind git diff and diff -u. It finds the longest sequence of lines that appears in both documents in the same order; everything outside that sequence is reported as an insertion or a deletion. That is why moving a paragraph shows up as a deletion in one place and an addition in another rather than as a "move".

Line mode vs word mode

Line mode is right for code, configuration files and structured data, where a line is a meaningful unit. Word mode is better for prose, where a single edited word would otherwise mark the whole paragraph as changed.

Practical uses

Tip: normalise before comparing

If two files differ only by indentation, line endings or key ordering, the diff will be full of noise. Turn on "ignore whitespace", or run structured data through the JSON formatter with "sort keys" first — the remaining differences are then the real ones.

Frequently asked questions

Is my text uploaded to compare it?

No. The diff algorithm runs in your browser, so you can safely compare contracts, credentials or proprietary code.

How large can the two texts be?

Comfortably a few thousand lines each. The algorithm is quadratic in the worst case, so very large files with few common lines can take a moment.

Why does moved text show as both removed and added?

A line-based diff preserves order. A block that moved is absent from its old position and present in a new one, so it is reported twice. Dedicated move detection is a separate, much more expensive analysis.

Can it compare Word documents or PDFs?

Not directly — paste the text content instead. Formatting, images and tracked changes are not part of the comparison.

What does "ignore whitespace" actually ignore?

Leading and trailing spaces and runs of internal whitespace are collapsed before comparison, so re-indentation and trailing spaces stop showing as changes.

Related tools