Word · Line · Character diff

Text Diff Checker & Clean Utility

Compare two pieces of text side by side with word, line, or character diff highlighting, then normalize whitespace and punctuation with the bundled text cleaner. Powered by diff-match-patch — everything runs locally in your browser.

Compare two texts

Auto-runs as you type · 300 ms debounce
Original 0 words · 0 chars
Modified 0 words · 0 chars
Words added
0
Words removed
0
Equal words
0
Similarity
added removed unchanged
Word diff
Diff output appears here. Press Load sample to see it in action.

How to use

Two tabs: Diff Checker compares two texts and shows inline highlights; Text Clean normalizes whitespace, line endings, and punctuation. Each tab has a Load sample button.

  1. Choose a tab — Diff Checker for comparing two texts, Text Clean for normalizing one text.
  2. Load sample or paste — press Load sample to fill both panes (Diff) or the input pane (Clean) with realistic example data.
  3. Pick options — in Diff: mode (word / line / character), ignore whitespace, ignore case; in Clean: toggle the six normalization rules.
  4. Run — Diff auto-runs 300 ms after you stop typing; press Swap left & right to flip original and modified. Clean runs on button click.
  5. Copy — press Copy diff to copy the highlighted diff as plain text with +/- markers, or Copy output for the cleaned text.

What it does

Word diff

Tokenizes both texts into words and whitespace, runs diff-match-patch, and reassembles with inline green additions and red strikethrough deletions.

Line diff

Encodes each line as a single character, diffs the encoded strings, and renders one block per line with full-line green/red backgrounds.

Character diff

Raw character-level diff with semantic cleanup. Best for spotting single-character edits inside words.

Similarity score

Percentage of matching characters over the longer text. Updates live with the diff.

Text cleaner

Six toggleable rules: trim per line, collapse spaces, drop empty lines, normalize CRLF to LF, dedupe trailing punctuation, and strip smart quotes.

Privacy

100% client-side. No paste is uploaded — verify in DevTools → Network. Only the diff-match-patch library loads from CDN on first visit.