/tools/diff-checker

Diff Checker

Paste two versions and see exactly which lines were added, removed or left alone — the same line-based comparison a version control system uses.

Diff CheckerRuns in your browser
Differences

How to use the Diff Checker

  1. Paste the original version on the left and the changed version on the right.
  2. Press Compare. Green lines were added, red lines removed, grey lines unchanged.
  3. Toggle the whitespace and case options to filter out differences you do not care about.

How the comparison works

This is a line-based diff built on the longest common subsequence — the same foundation used by diff, Git and most code review tools. The algorithm finds the largest set of lines that appear in both versions in the same order, then marks everything else as added or removed.

That framing explains a behaviour people sometimes find surprising: a line with one word changed shows as one removal plus one addition, not as a modification. At the line level, a changed line genuinely is an old line gone and a new line arrived.

The comparison is quadratic in the number of lines, so each side is capped at 2,000 lines to keep the browser responsive.

Using the ignore options well

Ignore whitespace is on by default and hides differences in indentation and trailing spaces. This is what you want when comparing code that has been reformatted, or text pasted from two different sources. Switch it off when whitespace is meaningful — in Python, YAML, Markdown, or anywhere alignment matters.

Ignore case is off by default, since case usually matters. Turn it on when comparing lists of names, email addresses or identifiers that were normalised differently by two systems.

Frequently asked questions

Can it show word-level changes within a line?

Not currently. Comparison is line by line, so an edited line appears as a removal and an addition. For prose where sentences shift slightly, that still makes the change easy to spot.

Are my two texts uploaded?

No. The comparison runs in your browser, so you can safely diff contracts, credentials, medical notes or unreleased code.

Why do identical-looking lines show as different?

Usually trailing whitespace, a non-breaking space pasted from a web page, or Windows versus Unix line endings. Switching on "Ignore leading and trailing whitespace" resolves most cases.

Can I compare two files?

Open each file in a text editor and paste the contents. Keeping the tool paste-only means nothing ever leaves your device.

Related tools