Free online text diff checker
This text diff checker compares two blocks of text and highlights exactly what changed between them. Paste an original version on the left and an edited version on the right, and every added, removed, and unchanged line is colour-coded instantly. It is ideal for spotting edits between two drafts of an article, comparing configuration files, reviewing code snippets, or checking what a colleague altered in a contract. The comparison is a literal line-by-line comparison, so each line is matched as a whole unit rather than word by word.
How to compare two texts
- Paste or type the first version into the Original box.
- Paste the second version into the Changed box.
- Read the highlighted result: removed lines appear in red with a minus marker, added lines appear in green with a plus marker, and unchanged lines stay plain.
- Check the summary counts, then click Copy diff to grab a plain-text version.
How the diff is calculated
Under the hood the tool splits both inputs into arrays of lines and builds a
Longest Common Subsequence (LCS) dynamic-programming table. Backtracking
through that table produces the minimal sequence of keep, add, and remove
operations — the same core technique that powers git diff and
other version-control tools. Because it works on whole lines, a single
changed character shows the old line as removed and the new line as added.
To tidy inconsistent spacing before comparing, try the
Remove Line Breaks tool, or count the
length of each version with the Word Counter.
Private and browser-based
Every comparison runs locally in your browser — nothing you paste is ever uploaded — so you can safely diff confidential code, documents, or data with no sign-up and no limits.