Word-Level Diffs With wdiff
Highlight exactly which words changed, not whole lines.
Run wdiff old.txt new.txt to show deleted and added words inline.
01Command
Command
$ wdiff old.txt new.txt02What it does
Line-based diff marks an entire paragraph changed when one word moves; wdiff compares token by token and brackets only the differing words, which is ideal for reviewing prose and documentation edits. Piping through colordiff makes it readable.
03Risk
!Warning: Word splitting is whitespace-based, so reflowed paragraphs can show many spurious changes.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- wdiff.1.en.html manual page (Debian bookworm)Evidence: Documents wdiff, which compares files word by word.
Last verified: 2026-10-13 · Category: Developer