Word-level diff

Word diff compares two texts whitespace-token by whitespace-token. Paste both texts into the input pane separated by a line of ---; matching words are emitted as-is, differing words are wrapped in [-old-]{+new+} markers. The diff runs in your browser; nothing uploads. For line-level changes use diff; for character-level use character diff.

Input
Line 1:1 LF cloud_done Saved locally
Result Word-Level Diff
0 lines 0 chars

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

  1. 1Paste text A into the input panel, then a line with ---, then paste text B.
  2. 2The word diff appears in the output panel, with [-old-]{+new+} markers on changed tokens.
  3. 3Click Copy to copy the marked-up text.
  4. 4Click Download to save it as a .txt file.
  5. 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 FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun 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.

Input
the quick brown fox
---
the slow brown fox
Output
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?
Alignment is positional, not content-aware. Token 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?
Yes. 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?
Yes. Changed tokens are wrapped [-old-]{+new+}, matching the format produced by git diff --word-diff. The output pastes cleanly into review notes.
How does this differ from character diff?
Character diff compares every codepoint position. Word diff works at whitespace-separated tokens, which is usually more readable for prose changes.
Where does my text go?
Nowhere. The diff runs locally in your browser via JavaScript. No upload, no logging.