Diff checker
Compared in your browser · nothing is uploaded
Compares two texts and marks what was added and removed, using a longest-common-subsequence match so an inserted line shows as one insert rather than shifting everything below it.
How to use the diff checker
That distinction is the whole reason a real diff is worth having. Comparing line one to line one, line two to line two and so on means a single inserted line at the top makes every subsequent line appear changed — technically true and completely useless. Finding the longest sequence of lines the two texts genuinely share, and marking only the gaps, is what produces a diff a person can read. Unchanged runs are folded to a marker by default, because a diff of two long documents is mostly unchanged lines and showing all of them buries the three that matter.
Questions
Because an inserted line shifts every line below it. This uses a longest-common-subsequence match, which finds the lines that genuinely correspond.