Text Diff Checker
Text Tools
Compare two texts and highlight the differences. Switch between line, word, and character granularity, and view results inline or side by side.
Runs entirely in your browserAbout Text Diff Checker
Diff tools are everywhere — Git uses them, every code review tool runs them, and documentation comparison depends on them. But sometimes you just need a quick diff of two paragraphs, two configuration files, or two versions of a piece of copy without going through Git. That's what this tool is for.
The diff algorithm is the classic Myers diff (via the `diff` library), the same one Git uses under the hood. You can pick the granularity — line for code/config diffs, word for prose, character for finding the exact spot two strings diverge. View the result inline (additions and deletions interleaved) or side by side (original on the left, changed on the right). An optional 'ignore whitespace' mode is useful for comparing files where only indentation has changed. Diff computation is debounced 120 ms so typing in large inputs stays responsive. All processing is local.
How to use
- 1
Paste both texts
Drop the Original into the left input and the Changed version into the right input.
- 2
Pick a granularity
Line for code or config diffs. Word for prose. Character for finding the exact spot two strings diverge.
- 3
Pick a view mode
Side by side shows old and new in two panels. Inline shows additions and deletions interleaved in one pane.
- 4
(Optional) Ignore whitespace
Toggle this on in line mode to ignore differences that are only indentation or trailing space.
- 5
Read the diff
Green is added text; red with strikethrough is removed. The header shows total bytes added and removed.
Examples
Comparing two product descriptions
Word granularity highlights individual word changes within sentences.
Input
Original: The quick brown fox jumps over the lazy dog.
Changed: The quick red fox jumps over the sleepy dog.Output
Words changed: 'brown' → 'red', 'lazy' → 'sleepy'Frequently asked questions
Which granularity should I use?+
Line for code/config (each line is independent). Word for prose (changes inside a sentence). Character for finding the exact divergence point in short strings or single-line data.
How big can the inputs be?+
Word and line diffs handle 100KB+ comfortably. Character-granularity diffs on very long strings (over 50KB each) can briefly freeze the UI. For multi-megabyte diffs, prefer line mode.
What does 'ignore whitespace' do exactly?+
In line mode, lines that differ only in leading/trailing whitespace count as identical. Useful when comparing files where indentation has changed but content hasn't.
Why is the diff debounced?+
Recomputing on every keystroke would freeze the browser for large inputs. The 120 ms debounce means the diff updates a fraction of a second after you stop typing — fast enough to feel live, slow enough to stay responsive.
Are my texts sent anywhere?+
No. Diffs are computed in your browser by the `diff` library; nothing is transmitted.
Related tools
Remove Duplicate Lines
Strip duplicate lines from text. Supports case sensitivity and whitespace trimming.
Word Counter
Count characters, words, sentences, and paragraphs with live reading-time estimates.
Case Converter
Convert text between upper, lower, title, camelCase, snake_case, kebab-case, and more.
Lorem Ipsum Generator
Generate placeholder text in classic, hipster, or corporate dialects.