twoodo
/

Home/Tools/Text & developer utilities

Text Diff Checker

Line-by-line comparison. Nothing is uploaded.

How the comparison works

The tool finds the longest common subsequence of lines — the largest set of lines appearing in both texts in the same order. Those are shown as unchanged. Anything in the original but not in that set was removed; anything in the new version but not in it was added.

This is the same principle behind the diff command and the comparison views in version control, and it is why a diff can show a single inserted line as one addition rather than reporting every subsequent line as changed.

Edits show as a removal and an addition

Changing a word within a line produces one red line and one green line rather than a highlighted word. That is how line-based comparison works: a line either matches or it does not.

Word-level and character-level diffs exist and are better for prose. For code, line-based is usually what you want, since a line is the meaningful unit.

Things that look like differences and are not

  • Trailing whitespace, invisible but different.
  • Line endings. Windows uses carriage return plus line feed; Unix uses line feed alone. A file moved between systems can appear entirely changed.
  • Tabs versus spaces, which look identical and are not.
  • A missing final newline, which makes the last line differ.

If two texts look the same and diff as different, it is almost always one of these.

Common uses

  • Checking what changed between two versions of a document.
  • Comparing configuration across two environments — a classic cause of "it works on mine".
  • Reviewing an edit someone returned to you.
  • Finding the difference between two lists.

Questions people ask

How does the comparison work?

By finding the longest common subsequence of lines — the largest set appearing in both in the same order. The same principle as the diff command.

Why does changing one word show two changed lines?

Because the comparison is line-based: a line either matches or it does not. Word-level diffs exist and suit prose better.

Two texts look identical but show as different — why?

Almost always trailing whitespace, line endings, tabs versus spaces, or a missing final newline.

Is my text uploaded?

No. Both texts are compared in your browser, which matters when comparing contracts or configuration.

Your text stays in the page

This matters more here than on most tools. People paste API keys into hash generators, customer data into CSV converters, contract wording into diff checkers and configuration into JSON validators. Almost every site offering these sends your input to a server to process it.

Nothing here is transmitted. The work happens in your browser, this site is static files with no server behind it, and the about page lists every request the site makes, read live from your own browser so you can check rather than trust.