📝 Text Diff Checker
Compare two texts and instantly see every difference highlighted. Added lines in green, removed lines in red. Perfect for comparing code, configs, JSON, documents, or any plain text.
Frequently Asked Questions
How does the diff algorithm work?
This tool uses the Longest Common Subsequence (LCS) algorithm to find the maximum set of lines that appear in both texts in the same order. Lines only in the original are shown as deletions (red), lines only in the modified text are shown as additions (green), and shared lines are shown as unchanged (grey).
Is my text kept private?
Yes — all processing happens in your browser. Your text is never sent to any server. You can use this tool safely with confidential code, passwords, or proprietary documents.
Can I compare JSON or code files?
Absolutely. This tool works on any plain text including JSON, YAML, Python, JavaScript, SQL, configuration files, and more. For best results with JSON, paste formatted (pretty-printed) JSON rather than minified JSON.
Free Online Text Diff Tool — Line-by-Line Comparison
Need to find what changed between two versions of a file? This diff tool compares any two texts and highlights every addition and deletion, making it easy to spot changes at a glance. It's ideal for code reviews, document comparison, configuration management, and debugging.
Common Use Cases
- Compare two versions of a config file or YAML/JSON document
- Find what changed between two code snippets
- Check if copy-pasted content matches the original
- Review changes to SQL queries or API responses