Word Diff Checker
Most diff tools compare line by line, which is useless when a single word changes inside a long paragraph: the whole line shows up as changed. This tool tokenizes both inputs down to the word (keeping whitespace and punctuation as their own tokens so the text can be perfectly reconstructed), then runs a classic LCS-based diff algorithm to find the minimal set of word-level changes. Added words are highlighted green, removed words are struck through in red, and unchanged words are shown plain, all inline in a single readable paragraph. Ideal for comparing two drafts of a sentence, a contract clause, or a paragraph of copy. Everything runs locally in your browser.
Reviewed by Vincenzo Manto, Founder & Lead Developer · Last updated September 27, 2026
How it works
- 1
Paste the original text on the left and the changed text on the right.
- 2
The tool tokenizes both texts into words and punctuation/whitespace, then computes the minimal word-level diff.
- 3
Read the inline result: green highlighted words were added, red strikethrough words were removed, plain words are unchanged.
- 4
The added/removed/unchanged word counts above the diff give you a quick summary of how much changed.
Why word-level diffing matters for prose
Line-based diff tools are built for source code, where each line is a meaningful unit. Prose doesn't work that way. A legal clause, a marketing sentence, or a paragraph of documentation often lives on one long line, and a single word swap makes a line-based diff highlight the entire line as 'changed', hiding exactly what moved.
A real LCS diff, not a naive word-by-word comparison
Simply comparing word N of text A to word N of text B breaks completely as soon as a word is inserted or deleted, since every subsequent word shifts position and looks 'changed' even though it's identical. This tool instead computes the Longest Common Subsequence between the two token streams, the same principled approach used by real diff tools, so insertions and deletions in the middle of a sentence are correctly identified without cascading false changes afterward.
Frequently asked questions
How is this different from a normal line-by-line diff tool?
A line-based diff marks an entire line as changed even if only one word inside it differs. This tool compares at the word level, so if you change one word in a 50-word sentence, only that word is flagged. Everything else stays marked as unchanged.
What algorithm does this use?
A classic Longest Common Subsequence (LCS) dynamic-programming diff, implemented from scratch, the same family of algorithm behind tools like the Unix `diff` command, applied here to a word-token stream instead of lines.
Does it handle punctuation and whitespace correctly?
Yes. Punctuation and whitespace are tokenized as their own tokens separate from words, so reconstructing either side of the diff by concatenating its tokens reproduces the original text exactly, including spacing and line breaks.
Is the diff guaranteed to be the smallest possible set of changes?
Yes, for these input sizes. The LCS algorithm finds a minimal edit script, and it never reports more additions/removals than necessary to turn the original text into the changed text.
Is my text uploaded anywhere?
No. Tokenizing and diffing both happen entirely in your browser using JavaScript. Nothing is sent to a server.