Text diff checker

Paste two versions of a text, a contract or some code to see which lines were removed, which were added, and which words changed.

FreeNo sign-upRuns on your device

Loading the tool…

How to use it

  1. Paste the original text on the left and the changed text on the right.
  2. Read the result: removed lines are red with a minus, added lines green with a plus.
  3. Look for highlighted words inside changed lines to see exactly what was edited.
  4. Tick Ignore case or Ignore extra spaces to hide changes that don't matter to you.

How the comparison works

The checker finds the longest run of lines the two texts share, in order, then marks everything else as removed or added. This is the same idea behind diff tools in Git and code editors. The line numbers on the left show where each line sits in the original and in the changed version.

When a removed line is followed by an added one, they are compared word by word, and only the words that changed are highlighted. That makes a one-word edit in a long paragraph easy to spot.

Lines that match in both versions are shown without colour, so you can read each change in its place. If the two texts are the same, the tool simply says there are no differences. A line that moved to a new place shows as removed in one spot and added in another, because the checker compares order as well as content.

Tips

Ignore extra spaces treats runs of spaces and tabs as one and ignores spaces at the ends of lines, which helps when an editor has reformatted the text. Ignore case treats upper and lower case as the same.

For JSON, format both versions with the JSON formatter first, with Sort keys on, so the comparison shows real changes rather than layout changes. For long documents, paragraphs on a single line show as one changed line, with the changed words highlighted inside.

Limits and privacy

Both texts stay in your browser and are never uploaded, so it's fine for private documents. Very large texts, with tens of thousands of different lines, may be too big to compare in a browser. The tool tells you if that happens.

Questions

How do I compare two documents for differences?

Copy the text of each version and paste one into each box. Removed lines show in red, added lines in green, and changed words are highlighted.

Can I compare code with this?

Yes. It works line by line like Git's diff and keeps your spacing, so it suits code, config files and data.

Is my text uploaded?

No. The comparison runs in your browser. Nothing is sent or saved.

Why does a small change show the whole line as changed?

The checker works line by line, so any edit marks the line. Look for the highlighted words in that line to see the exact change.