Developer Tools
Text Diff
Compare two texts side-by-side or in unified format with line, word, and character-level highlighting.
Options
Paste text into both panes above to see the diff — or .
All diffing runs entirely in your browser. Your text is never sent anywhere.
☕ Love this tool? Support the developer.
100% free — no ads, no limits. Your support keeps every tool free.
Secure payment via Stripe · No account needed
About Text Diff
OptiPix Text Diff is a full-featured text comparison tool that instantly shows you what changed between two versions of any text. Paste your Original and Modified text into the two panes and get a detailed diff in milliseconds. Choose between Side-by-Side view — with aligned line numbers, red-highlighted deletions, green additions, and yellow changed lines — or Unified diff view with the classic -/+ prefix format and 3 lines of context around each change. Within changed lines, character-level or word-level inline highlighting pinpoints exactly which characters differ. Options let you ignore case, collapse whitespace differences, and trim trailing spaces so you focus on meaningful changes. A live statistics panel shows lines added, deleted, changed, unchanged, and overall percentage identical. Copy the result as a standard unified diff string or download it as a .diff file. Drop .txt files directly onto either pane to load them. All processing happens 100% in your browser — your text never leaves your device.
How It Works
The tool uses the 'diff' npm library (diffLines, diffWords, diffChars) to compute an edit-distance-based diff between the two inputs. For Side-by-Side view it pairs removed/added line blocks and aligns them; for Unified view it applies a 3-line context window. Inline highlighting runs a second word- or character-level diff pass on each changed line pair.
Use Cases
- •Compare two versions of a document or article
- •Review code changes without a full IDE
- •Spot differences between configuration files
- •Verify that edits were applied correctly in any text
- •Generate a .diff patch file for sharing changes
Frequently Asked Questions
What diff views are available?
What does the inline character highlighting do?
What do the options do?
Can I compare files?
Is my text sent to any server?
Related Tools
Word Counter
Count words, characters, sentences, paragraphs, and reading time — with readability scores and keyword density.
Case Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, and 10+ more formats.
JSON Formatter / Validator
Format, beautify, minify, and validate JSON with syntax highlighting and tree view.
Image Comparison
Compare two images — slider, side-by-side, diff, onion skin, and pixel statistics.