WebGroundwebground.app
Utilities · Text Tool

Text Diff Checker: Compare Two Texts

Compare two versions of a text and highlight added, removed, and changed lines, with options to ignore case and whitespace.

Your texts are compared in your browser and are never uploaded.
Comparison options

Differences

Enter text in both boxes to see the differences.

How the Comparison Works

The tool splits both texts into lines and works out which lines they share, in order. Lines found only in the original are marked as removed with a minus sign, and lines found only in the changed text are marked as added with a plus sign. Every line keeps the line number it has in its own text.

When a removed line and an added line take each other's place, they are treated as one changed line and the words that differ are highlighted inside it. That makes a small edit in a long sentence easy to spot.

Options for a Cleaner Result

Differences that do not matter can hide the ones that do. The options change how lines are compared, never how they are displayed. Windows and Unix line endings and a missing line break at the end of a text are never reported as differences.

  • Ignore case treats uppercase and lowercase letters as the same, so Hello and hello match.
  • Ignore whitespace disregards indentation, trailing spaces, and repeated spaces or tabs inside a line.
  • Show changes only hides long runs of unchanged lines and keeps three lines of context around each change.
  • Copy as unified diff gives you the result in the plain-text format used by Git and patch tools.

Frequently Asked Questions

Is the text I compare sent to a server?+

No. Both texts stay in your browser and are compared by JavaScript on your device. Nothing is uploaded or stored, and the boxes are empty again after you reload the page.

How large can the texts be?+

Each text can have up to 20,000 lines and 1,000,000 characters. For large texts that have little in common, the tool switches to a faster comparison that is still correct but can mark more lines than strictly necessary, and it tells you when that happens.

Why is a line marked as changed when it looks the same?+

The two lines usually differ in something that is hard to see, such as a trailing space, a tab instead of spaces, or a different kind of quotation mark or dash. Turn on Ignore whitespace to rule out spacing, and check the highlighted words to find the exact spot.

Explore More on WebGround

View all