Text Diff Checker

Compare two pieces of text line by line and see additions and deletions highlighted. Ignore whitespace or case. Runs privately in your browser.

How to compare two texts

Paste the older version on the left and the newer version on the right, then press Compare. Lines that only exist on the left are shown in red with a minus sign; lines that only exist on the right are green with a plus sign. Unchanged lines stay plain so you keep the context. The two number columns show where each line sits in the original and the changed text.

The comparison works line by line using the longest common subsequence algorithm, which is the same idea behind git diff and the classic Unix diff command. It finds the largest set of lines the two texts share and treats everything else as an insertion or a deletion.

When the options help

  • Ignore whitespace trims each line and collapses repeated spaces before comparing. Use it when one version was re-indented or someone's editor converted tabs to spaces.
  • Ignore case is useful for SQL, HTML attribute names or any text where capitalisation is not meaningful.
  • Only show changes hides unchanged lines, which makes long config files much easier to scan.

Practical uses

We use a diff checker far more often than we expected to. A few situations where it saves real time:

  • Comparing two API responses when "it worked yesterday". Run both through the JSON formatter with Sort keys first so key ordering doesn't show up as a change.
  • Checking what changed between two versions of a contract, policy or blog draft that someone emailed you.
  • Spotting the one different line in two environment files or Kubernetes manifests.
  • Reviewing a config change before pasting it into a production console.

Limitations

Because everything runs in your browser, very large inputs are capped at roughly three thousand lines per side. Beyond that the comparison table becomes too large to build quickly on a phone. The tool also compares whole lines; if a single long line has one word changed, the entire line shows as removed and re-added. For prose, putting each sentence on its own line gives much more precise results.

Frequently asked questions

Is this the same as git diff?

It uses the same basic approach (longest common subsequence on lines) but without git-specific features such as rename detection or patience diff.

Can I compare files?

Open each file in any editor, copy the contents and paste them into the two boxes. Nothing is uploaded.

Why is a whole line marked as changed when only one word differs?

The tool compares complete lines. Splitting long paragraphs into one sentence per line gives finer-grained results.