Word-by-word change markers
Word diff splits each side on whitespace using the regex \s+ and walks both token lists in parallel. Identical tokens at the same index pass through; differing tokens are wrapped in a [-old-]{+new+} pair. The marker syntax is the same as git diff --word-diff, which makes the output paste-ready into pull-request descriptions and review notes.
The split between text A and text B is a line containing exactly ---. Token alignment is by position, not by content; if you insert a word at the start of B, every subsequent word will register as a change. This is the same trade-off as line diff. For finer granularity see character diff.
Whitespace itself is collapsed during tokenisation, so multiple spaces, tabs, and line breaks all get merged into single token boundaries. If you need whitespace-preserving comparison, use line diff or character diff instead.
How to use word-level diff
- 1Paste text A into the input panel, then a line with
---, then paste text B. - 2The word diff appears in the output panel, with
[-old-]{+new+}markers on changed tokens. - 3Click Copy to copy the marked-up text.
- 4Click Download to save it as a
.txtfile. - 5Paste the result into pull-request descriptions or review notes; the marker syntax matches
git diff --word-diff.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
How the word diff works
Whitespace tokenisation
Both halves are split with \s+, so tabs, multiple spaces, and line breaks all act as token boundaries. Tokens themselves can contain any non-whitespace character including punctuation.
Position-based alignment
Token i in A is compared to token i in B. Inserting a word shifts every subsequent index, which can cascade as a string of changes. For semantically aligned diffs run a longer block through line diff first.
Git-compatible marker syntax
Changed tokens are wrapped [-old-]{+new+}, the same convention as git diff --word-diff. Copy-paste straight into a Markdown review or chat.
Case and punctuation sensitive
Fox and fox register as a change, and fox. versus fox registers as well. The token is compared as a complete string.
Three-hyphen separator
Both halves go in the same input pane, split by a line containing exactly ---. Output is space-separated regardless of original line breaks.
Worked example
Three tokens match. The second token differs, so it is wrapped [-quick-]{+slow+}. For sub-word changes (one letter) use character diff.
the quick brown fox --- the slow brown fox
the [-quick-]{+slow+} brown fox
Settings reference
| Behaviour | Effect on output |
|---|---|
| Separator | A line containing exactly --- splits text A from text B. |
| Tokeniser | Split on \s+ (any whitespace run). |
| Match rule | Exact string equality on each token, including case and punctuation. |
| Output for matches | Token emitted as-is. |
| Output for changes | Token pair wrapped [-from-A-]{+from-B+}. |
| Whitespace | Collapsed during tokenisation; output joins with single spaces. |
| Missing separator | Output prompts for two halves split by ---. |
FAQ
Why does inserting a word mark everything after it as changed?
i in A is compared to token i in B, so an insertion shifts every later index. Run shorter spans, or use line diff on logically aligned blocks.Are punctuation and case considered?
fox. versus fox registers as a change, and Fox versus fox registers too. Tokens compare as exact strings.Is the output compatible with Git word-diff syntax?
[-old-]{+new+}, matching the format produced by git diff --word-diff. The output pastes cleanly into review notes.