Online Diff Checker
Compare two text documents or code snippets to pinpoint additions, deletions, and modifications with word-level highlight. Runs 100% locally in your browser.
How the Diff Algorithm Works
A diff tool calculates the difference between two files using the Longest Common Subsequence (LCS) problem, popularized by Eugene W. Myers' landmark 1986 paper An O(ND) Difference Algorithm and Its Variations.
- Additions (Green): Content present in the modified text that did not exist in the original text.
- Deletions (Red): Content removed from the original text.
- Unchanged (Neutral): Portions where content remains character-for-character identical.
Related Developer & Web Utilities
JSON Formatter & Validator
Beautify, minify, and inspect JSON payloads with interactive collapsible tree view.
Pomodoro Focus Timer
Deep work interval clock with synthesized lo-fi and gentle rain background audio.
PayPal & Stripe Fee Calculator
Calculate software contractor processing fees and client invoice net totals.
Frequently Asked Questions (FAQ)
How does this diff checker compare two texts?
The tool uses an optimized Longest Common Subsequence (LCS) algorithm to align corresponding lines between the original and changed text, pinpointing additions in green and deletions in red.
Can I compare code snippets in Python, JavaScript, and HTML?
Yes! The diff checker works across any programming language, markup, JSON, configuration files, and plain legal or academic texts.
Is my proprietary code kept private?
Yes, absolutely. All diff calculations run locally within your web browser. None of your source code, contracts, or private text is ever uploaded to a server.
What is the difference between side-by-side and unified view?
Side-by-side view places the original text on the left and the modified text on the right for visual comparison. Unified view shows changes chronologically in a single continuous stream.