Diff Checker

Paste an original and a modified text side by side to see added, removed and changed lines.

Original Text
Modified Text
Enter text and click 'Compare' to see the differences.

The tool splits both texts into lines and finds changes with an LCS match on the lines both sides share. The comparison runs in the page, and pasted text is not uploaded or stored.

Two YAML versions compared:

OriginalModifiedShown as
server:server:Unmarked, line 1
port: 8080 port: 9090Changed; 8080 and 9090 are highlighted
debug: falsedebug: trueChanged; only false and true highlighted
(none)log: infoAdded, line +5

The stats read +1 added, -0 removed and ~2 changed.

When two lines count as one change

When a line disappears and a new one appears right after, the tool counts how many characters of the shorter line occur in the longer. Above 30% of the longer line's length, it is a change. So port: 8080 against port: 9090 is a change, while B against D is a removal plus an addition. Inside a changed line, words are matched by position, so adding a before the quick brown fox makes the whole line look different.

Ignore Whitespace treats runs of spaces and tabs as one space and trims line ends. Ignore Case lowercases before comparing. A moved paragraph shows up as a removal and an addition. A paragraph on one line is flagged for a single changed letter, so put one sentence per line.

Thousands of lines get slow, because the work grows with the product of both line counts. For big files use git diff --no-index a.txt b.txt. For two JSON documents, align them first with the JSON formatter.