Text Diff Tool Online — Word, Char, Line Level
Compare 2 texts with + / − added/removed highlights. 3 modes: word-level (default, easy to read), char-level (precise), line-level (for code). Added/removed/unchanged stats.
The quickfast brown fox jumpsleaped over thea lazy dog.!
Why use this tool
Word: per word, easy to read. Char: per character, precise. Line: per line, for code.
Number of chars/words/lines added (green), removed (red), unchanged. Quick overview of change scale.
Editing either side updates the diff instantly. No button needed.
How to use
- 1Paste Text A (original) on the left, Text B (modified) on the right.
- 2Pick mode: word (default) / char / line.
- 3Diff highlight: green = added, red + strike = removed, gray = unchanged.
Text diff
The diff algorithm uses Myers diff (E. Myers, 1986) — O(ND) complexity, optimized for text. Implemented by the jsdiff library.
Word-level: splits by whitespace + punctuation. Char-level: per character. Line-level: per \n.
- ✓3 levels: word / char / line
- ✓Inline + / − highlighting
- ✓Added / removed / unchanged stats
- ✓Realtime update
- ✓Pure client-side
- ✓Myers diff algorithm
FAQ
How is this different from git diff?
Git diff is line-level + Patience/Histogram algorithms. The tool uses Myers — sufficient for daily comparisons. For formal code review, use git.
Is diff on >100KB text slow?
Yes. Diff is O(ND) — long input + many changes is exponential. For text >50KB we recommend splitting.