Text Compare / Diff Viewer
Compare two texts line by line. Added lines are green, removed lines red, unchanged lines shown for context.
Compare two texts and see line-by-line differences highlighted: additions, deletions and unchanged lines. Useful for code reviews, document revisions and spotting exactly what changed between two versions.
Comparison: line-based diff computed locally in your browser.
Diff
How to use the Diff Checker / Text Compare
- Paste the original text on the left and the new version on the right.
- Differences are computed instantly.
- Scroll the highlighted diff β additions, deletions and unchanged lines are color-coded.
Frequently asked questions
How do I compare two texts online?
Paste both versions above; the diff highlights added and removed lines.
Is the comparison done on a server?
No β the diff algorithm runs entirely in your browser, so sensitive documents never leave your machine.
What counts as a change?
The viewer works line-by-line: changed lines show as removed/added pairs.
Can I diff code?
Yes. Line-level diffs work well for review; a code editor with syntax highlighting may be nicer for large files.
Fun facts about Text Diff Viewer
- The 'diff' utility was first developed in the early 1970s at Bell Labs as part of the Unix operating system.
- The most common diff algorithm (Myers' algorithm, 1986) finds the shortest edit script between two texts β the minimum number of insertions and deletions.
- Git stores snapshots, not diffs: 'git diff' computes the differences on demand, using Myers' algorithm by default.
- The unified diff format (lines prefixed with + and -) was added to POSIX in 2008 and is what code-review tools display today.
- The longest common subsequence (LCS) problem, which diff algorithms solve, is a classic computer science problem with applications in bioinformatics (DNA sequence alignment).