Diff Checker: How to Compare Two Texts and Read a Diff
By FindMySum · Last reviewed
A diff checker shows exactly what changed between two versions of a text: which lines were removed, which were added, and which words changed inside a line. Paste the original on the left and the new version on the right; the differences appear straight away, and both texts stay in your browser.
What people use it for
Comparing two drafts of a contract or an essay to find the sentence someone quietly edited. Checking a configuration file against a known-good copy before a deployment. Seeing what a colleague changed in a SQL query or a block of code they pasted into a chat. Confirming that two long lists, such as exported email addresses, really are the same. Anywhere two versions of text exist, a diff is faster and more reliable than reading both side by side.
How to use the tool
- Paste the older version into Original text and the newer one into Changed text. Swap them if you got them the wrong way round; removals and additions trade places.
- Choose Side by side to read the two versions in parallel, or Inline for a single column, which is easier on a phone.
- Turn on the ignore options when spacing, letter case or line endings aren't what you care about.
- Long stretches of unchanged lines are folded away; select one to expand it.
- Copy or download the unified diff to attach to a bug report or apply with a patch tool.
A worked example
Take a shopping list where "milk" became "oat milk", "6 eggs" became "12 eggs", and "bananas" was added. The line diff finds 4 unchanged lines, 2 changed lines and 1 added line. In the changed lines, the word highlight marks only "oat " and "12": the rest of each line is the same. The unified diff starts with @@ -1,6 +1,7 @@, because the hunk covers all 6 lines of the original and all 7 of the changed list.
Reading the result
Red lines with a minus sign exist only in the original; green lines with a plus sign exist only in the changed text. A changed line shows both, with the differing words marked more strongly, so the change doesn't depend on colour alone. The counts under the diff add up the lines removed and added: a changed line counts once as removed and once as added, as GNU diff counts it.
Common mistakes
Comparing in the wrong direction. If additions look like removals, the texts are the wrong way round; use the swap button.
Chasing invisible differences. Copying from a PDF, a word processor or a web page can add non-breaking spaces, curly quotes or trailing spaces. When a line looks identical but shows as changed, try the ignore options first.
Expecting it to understand meaning. A diff compares characters and lines, not ideas. Reordering two paragraphs shows as one removed and one added, even though nothing was rewritten.
To count the words or characters in either version, use the word counter.