Comparing two texts
Paste the original on the left and the new version on the right. Added lines are marked + and removed lines −, with line numbers from both sides. A changed line shows as a removal followed by an addition. The comparison uses the Myers algorithm, the same one git diff uses by default, so it finds the smallest set of changes.
Options
- Ignore whitespace treats lines as equal when they differ only in indentation, trailing spaces or repeated spaces. Use it after a reformat, or when tabs and spaces are mixed.
- Ignore case treats
SELECTandselectas the same. - Only changed lines and context hides unchanged stretches and keeps 3 lines either side of each change, like a code review.
Comparing JSON
JSON from two systems often has the same data with different key order or formatting, and a line diff then shows everything as changed. Run both through the JSON formatter with “Sort keys” on first, then compare the results here.
Copy as patch
“Copy as patch” gives you a unified diff, the format git diff and code review tools use. Paste it into a ticket or chat to show exactly what changed.
From the command line
diff -u original.txt changed.txt
git diff --no-index original.txt changed.txt # works outside a repo
git diff --word-diff # changes within lines