Text Diff
Compare two blocks of text and see added, removed, and unchanged lines side-by-side. Everything runs locally in your browser.
About Text Diff Tool
This free online text diff tool compares two blocks of text and shows the differences line by line using an LCS (longest-common-subsequence) algorithm — the same technique used by Git and most diff viewers. Added lines are shown in green, removed lines in red, and unchanged lines in neutral.
How It Works
The algorithm computes the longest common subsequence between the two inputs, then walks the result to emit the minimal set of insertions and deletions. Everything happens locally — your text never leaves the browser.
Key Benefits
- Line-by-line output: Added, removed, and unchanged lines clearly marked
- Dual line numbers: See original and modified positions side-by-side
- Diff stats: Totals for added, removed, and unchanged lines
- Fully private: No uploads — safe for proprietary code and documents
- Fast: Handles several thousand lines comfortably
Fast LCS diff
Minimal insertions and deletions computed via a classic longest-common-subsequence pass.
Fully private
Both inputs stay in your browser — ideal for internal source code and documents.
Readable output
Added, removed, and unchanged lines shown with color, line numbers, and totals.