🔍 Text Compare (Diff Checker)
Paste the original and the revised version to see exactly what was added, removed or changed — line by line, with the changed words highlighted. Ideal for contracts, drafts and config files.
How to compare two texts
- Paste the original (older version) into A on the left and the revised version into B on the right. The comparison updates as you type.
- In the result, red lines exist only in A (removed) and green lines are new in B (added). When only part of a line changed, just those characters or words are highlighted more strongly.
- For long documents, turn on Only show changes to see three lines of context around each change. Click a folded section to expand it.
- copy gives you the diff as plain text with
+and-in front of each line, ready to paste into an email, Slack or a ticket.
Options
| Option | What it does | When to use it |
|---|---|---|
| Ignore whitespace | Ignores differences in spaces, tabs and trailing spaces | Code where only indentation changed; drafts where only spacing was fixed |
| Ignore case | Treats Apple and apple as equal | Lists, keywords and SQL where capitalization doesn't matter |
| Character / Word | Highlights differences inside changed lines character by character or word by word | Character for typos and numbers; word for edited prose |
| Side by side / Unified | Shows A and B in two columns, or one column with −/+ lines like git | Side by side on desktop, unified on phones (the default on small screens) |
Reading the numbers
- Changed — lines edited in place. When removed and added lines appear together, lines that share at least 40% of their characters are paired in order as "changed", and the differences inside them are highlighted. Lines that are very different are shown as a separate removal and addition.
- Added +N / Removed −N — the same as the
+/-line counts in git. A changed line counts as one removal plus one addition. - Line similarity — the share of lines that stayed the same: 2 × unchanged ÷ (lines in A + lines in B). 100% means the texts are identical line by line.
How the diff works (LCS and the Myers algorithm)
The longest list of lines that appears in both texts, in the same order, is called the longest common subsequence (LCS). Lines from A that aren't in the LCS are removals; lines from B that aren't are additions. This tool uses the Myers diff algorithm — the same one behind git and most diff programs — to find the smallest set of removals and additions, then runs it again on the characters or words inside each changed line.
Myers is fastest when the texts are similar, so comparing two versions of the same document finishes almost instantly even at tens of thousands of lines. Two completely different texts take much more work, so once the difference exceeds 3,000 lines the tool aligns only the matching lines at the start and end and shows the middle as removed and added. Each side accepts up to 300,000 characters and 20,000 lines.
When to use it
- Contracts and leases — see exactly where the rent, dates or clause numbers changed in the version the other party sent back. Even a single digit is highlighted.
- Essays and drafts — compare before and after an edit to see which sentences your editor or teacher changed. Word highlighting reads best for prose.
- Config files, code and SQL — compare two versions of a config or query. Turn on "Ignore whitespace" to hide indentation-only changes.
- Lists and spreadsheet columns — paste two lists to see missing (removed) and new (added) items. Sort both lists first for an accurate comparison.
Because the comparison is line by line, moving a paragraph shows up as a removal plus an addition, and re-wrapping a paragraph at different points marks several lines as changed. Normalize the line breaks first with the line break remover. Your texts are compared entirely in your browser and are never uploaded or saved.