Text diff
Paste an original text and a revised version to see exactly what changed — line by line or word by word. Review contract edits, track config drift, or compare homework drafts without installing diff software. All comparison runs locally; neither version leaves your browser.
Text A
Text B
How to compare two texts
1. Paste the original (old) text in the left or first panel.
2. Paste the updated (new) text in the right or second panel.
3. Choose line-based or word-based diff if the tool offers both.
4. Review highlighted additions, deletions, and changes; copy either version as needed.
Diff examples
Config file change
Compare two nginx.conf snippets: one line changed from "worker_processes 4;" to "worker_processes 8;" — highlighted immediately without deploying.
Contract revision
Legal text v3 vs v4: three paragraphs modified and one sentence removed. Line diff shows which clauses moved before you sign.
Code review snippet
Paste function before and after refactor — added null check and renamed variable show as green/red highlights.
When to use text diff
• When you receive an edited document and need to see every change quickly.
• When you compare environment configs, JSON, or YAML between staging and production.
• When you verify that a translation or rewrite preserved critical numbers and terms.
When to choose something else
• When you need Git history, blame, or merge conflict resolution — use Git or your IDE.
• When you compare binary files, PDFs, or images — use specialized diff or visual tools.
• When you only need to remove duplicate lines — use the duplicate line remover.
How diff algorithms work (simply)
A diff finds the longest common subsequence between two texts and marks everything else as added or removed. Line-based diff splits on newline characters first, which is why rewrapping a paragraph can show many changes even when words are the same. Word-based diff splits on spaces for finer granularity in prose.
Review workflows for teams
Before approving a policy update, diff the PDF-extracted text against the previous version to catch silent numeric changes. Developers paste API response samples before and after a backend deploy. Writers compare client edits to their original draft to accept or reject changes systematically.
Frequently asked questions
Line diff vs word diff — which should I use?
Line diff is best for code, configs, and multi-line prose. Word diff helps when a few words changed inside long paragraphs.
Does whitespace matter?
Yes, by default trailing spaces and blank lines differ. Some tools offer "ignore whitespace" for cleaner prose comparison.
Can I diff large files?
Very large texts may slow the browser. For megabyte-scale logs, consider command-line diff tools.
Is either text uploaded?
No. Comparison is computed entirely in your browser.
Can I export the diff?
Copy highlighted output or screenshots manually. This tool focuses on quick visual review, not patch file generation.
Does it work with JSON or XML?
Yes, as plain text. For formatted pretty-print comparison, consider the JSON or XML formatter tools first.