Text Diff — Compare Two Blocks of Text
Compares two blocks of text line by line and lists exactly what was added and removed.
Loading the tool…
How to use this tool
- Paste the original on the left and the version you are comparing on the right.
- Turn on ignoring whitespace if the two came from different tools and only the layout differs.
- Select Compare.
- Read the pairs: a removal immediately followed by an addition is usually one line that was edited rather than two separate changes.
What text diff does
This finds the longest sequence of lines the two texts have in common and reports everything else as an addition or a removal. That is the same approach a version control diff takes, and it is why the result stays readable when a block has been inserted in the middle: the lines after it are recognised as unchanged rather than every line from that point on being reported as different.
Comparison is by whole lines, so a line with one word changed shows as a removal and an addition rather than a highlighted word. Whitespace differences and case differences can each be ignored, which is what makes this usable on two exports of the same query or two copies of a configuration file that have drifted.