Word-Level Diffs With wdiff

Highlight exactly which words changed, not whole lines.

LinuxdifftextcliLow risk
Run wdiff old.txt new.txt to show deleted and added words inline.

01Command

Command
$ wdiff old.txt new.txt

02What 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

RiskLow risk
Requirementssudo apt install wdiff
!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

Last verified: 2026-10-13 · Category: Developer

06Related solutions