inyourbrowser.com

Word-level text diff

Paste two versions of any text to highlight exactly which words were added or removed within each changed line. Line-level diffing tells you that a sentence changed, but word-level highlighting shows you precisely which words were edited, which helps when proofreading copy edits, comparing translations, and reviewing revisions to your text. All diffing runs in your browser.

Original
Drop a text file or click to choose
Updated
Drop a text file or click to choose
+ 0 added− 0 removed= 0 unchanged
Paste text in both panes above to see the diff.

ACTIONS

Runs entirely in your browser

How it works

A Web Worker first compares whole lines with a longest common subsequence (LCS) algorithm, after setting aside the lines that match at the start and end of both texts. Each changed line is then paired with its new version and split into words at whitespace, with punctuation kept on its word, and a second LCS pass over those words marks the ones removed and added. The old version is shown first, marked −, then the new one, marked +. When a very long changed line exceeds the word-comparison budget, its changed part is marked as a whole, and the page says so.

Processing runs in your browser

All diffing is done locally using browser APIs. Our servers are not involved at any point.

Frequently asked questions

What is a word diff?
A word diff compares two texts line by line, then marks the individual words that were removed or added inside each changed line, instead of flagging the whole line.
Does it catch a change of one letter?
Yes, but it highlights the whole word that contains the change, because highlighting works on whole words: changing 'colour' to 'color' marks 'colour' as removed and 'color' as added.
Are punctuation changes highlighted?
Yes. Punctuation belongs to the word it touches, so changing 'end.' to 'end!' marks 'end.' as removed and 'end!' as added.
How is the result laid out?
In one column. Each changed line appears twice, first the old version marked − with removed words highlighted, then the new version marked + with added words highlighted. Unchanged lines appear once, and long unchanged stretches are folded.

Related operations

For making the same change everywhere in one file, try find and replace. To put both inputs in matching order before comparing, use sort lines. For diffing two JSON payloads after pretty-printing, see the JSON formatter.

Last reviewed September 30, 2026

Other pages for this tool

Related tools

Find & replace
Find and replace text with plain search or regular expressions. Supports case-sensitive and whole-word matching.
Sort lines
Sort lines alphabetically, by length, or shuffle randomly. Remove duplicates and empty lines in one click.
Word counter
Count words, characters, sentences, and paragraphs. All processing runs in your browser.
Hash generator
Generate SHA-256, SHA-512, SHA-1, and MD5 hashes. Verify file checksums locally.