Diff Checker — Text & Code Difference Comparator
Compare two text or code snippets line by line to highlight additions, deletions, and modifications with 100% privacy.
Methodology & standardsRuns on your device
Inputs
Results update liveDiff Comparison+4 additions-3 deletions
1-function calculateTotal(items) {
1+function calculateTotal(items, taxRate = 0.08) {
22 let subtotal = 0;
33 for (const item of items) {
4- subtotal += item.price;
4+ subtotal += item.price * (item.quantity || 1);
55 }
6- return subtotal;
6+ const tax = subtotal * taxRate;
7+ return subtotal + tax;
78 }
FAQ
Frequently asked questions
How the calculation works and where its limits are.
How does the online text diff checker work?
The diff checker compares your original and modified text line by line using an in-browser Myers difference algorithm, highlighting newly added lines in green and removed lines in red.
Is my code or sensitive data sent to any server?
No. All diff computations and line-by-line analyses execute 100% locally in your browser memory.
Can I compare code files like JavaScript, Python, or JSON?
Yes. The diff checker works with any plain text format including code, config files, Markdown, JSON, and prose.