How to use it
- Paste the original version on the left and the new version on the right. The comparison runs on every keystroke.
- Pick the granularity: words for prose, characters to catch typos and punctuation, lines for code, lists or CSV.
- Tick “Ignore case” or “Ignore whitespace” if those differences are noise for your purpose.
- Read the summary (changes, added, removed, similarity), then switch between side-by-side and inline views.
- Use “Swap texts” to reverse the direction, “Copy unified diff” to export, “Clear” to start again.
Example
“Load example” fills in two versions of a dispatch email. Comparing by words finds 3 changes: “3 working days” became “2 working days”, “our courier partner” became “DHL”, and a phone number was added to the last sentence. The summary reads +8 words added, −4 words removed, 35 unchanged, 85% similar. The side-by-side view shows the 8 lines of the email, with the two edited lines highlighted and the exact words marked inside them.
How the comparison works
The texts are split into tokens (words and the whitespace between them, single characters, or lines) and the shortest edit script between the two token lists is found with Myers’ O(ND) difference algorithm, the same algorithm behind diff and Git. The jsdiff library does the computation in your browser; a comparison that would take more than four seconds is abandoned with a message rather than freezing the page.
similarity = 2 × unchanged ÷ ((unchanged + removed) + (unchanged + added))- Words: whitespace changes count as a change block but add no words to the added/removed totals. With “Ignore whitespace” the amount and kind of whitespace between words is disregarded entirely.
- Characters: every Unicode code point is a token. “Ignore whitespace” collapses each run of spaces, tabs and line breaks to a single space before comparing.
- Lines: whole lines are compared; “Ignore whitespace” trims each line and collapses inner spacing, “Ignore case” lower-cases it. The side-by-side table always aligns by line and pairs a block of removed lines with the block of added lines that follows it, highlighting words or characters inside each pair.
- The unified diff is always exact (options are not applied), uses three lines of context and names the files
original.txtandchanged.txt.
Sources: Myers, E. W. (1986). An O(ND) Difference Algorithm and Its Variations. Algorithmica 1, jsdiff – JavaScript text differencing library, GNU Diffutils – Unified format.
Limits
- Moved paragraphs appear as a deletion in one place and an insertion in another; the tool does not detect moves.
- Very long or completely different texts can hit the four-second limit; compare by lines or in smaller chunks.
- Formatting (bold, fonts, images) is not compared: paste plain text, or export documents to text first.
Questions
- Can I compare two Word or PDF documents?
- Paste their text. Copy all text from each document (Ctrl+A, Ctrl+C) into the two boxes; formatting is dropped, but every wording change is found. For tracked formatting changes use the word processor’s own compare feature.
- Which mode should I use for code?
- Lines, with "Ignore whitespace" switched on if indentation changed. The side-by-side view then matches a code review, and "Copy unified diff" gives a patch in the format Git uses.
- Why does a changed word show as one deletion and one insertion?
- A diff only knows "same" or "different" per token. Switch to characters to see which letters inside the word changed, or keep words and read the paired red/green marks as a replacement.
- Is anything uploaded?
- No. The comparison runs in your browser and the texts are not stored or put in the link; only your chosen options are.