Text Compare Examples
Five real-world examples showing what TextCompare highlights when you paste before-and-after texts. Each example includes the actual input, an explanation of what the diff detects, and a link to try the comparison yourself.
Example 1 — Document Revision
A blog post introduction is revised for clarity. The writer wants to see exactly which sentences changed before accepting the editor's version. Use word-mode diff for this type of prose comparison.
The internet has changed
the way we communicate.
People now use social media
to share information quickly.
This has had a large impact
on the news industry.
The internet has transformed
how we communicate globally.
People increasingly use social media
to share information in real time.
This has had a profound impact
on journalism and media.
Example 2 — Code Change
A developer refactors a JavaScript function to use const instead of var and adds input validation. Use the Code Diff Checker for a unified view that mirrors git diff.
function calculateTotal(price, qty) {
var total = price * qty;
return total;
}
function calculateTotal(price, qty) {
if (price < 0 || qty < 0) {
throw new Error('Negative values not allowed');
}
const total = price * qty;
return total;
}
var total → const total). The intra-line diff highlights only the word "var" as removed and "const" as added — the rest of that line is unchanged. Line numbers in the gutter let the developer reference the diff in a code review comment.
Example 3 — JSON Configuration Change
A DevOps engineer compares two versions of an application config file after a deployment to verify only the intended values changed. Use the JSON Diff Checker to normalize formatting before comparing.
{
"env": "staging",
"maxConnections": 10,
"timeout": 30,
"debug": true,
"logLevel": "info"
}
{
"env": "production",
"maxConnections": 50,
"timeout": 30,
"debug": false,
"logLevel": "warn"
}
env from "staging" to "production", maxConnections from 10 to 50, debug from true to false, and logLevel from "info" to "warn". timeout is unchanged. The JSON Diff Checker normalizes key ordering and whitespace first, so only true value changes are flagged — a reformatted JSON file would show zero differences even if the raw text looks different.
Example 4 — Contract Clause Update
A counterparty returns a contract with modified limitation-of-liability language. The lawyer wants to verify exactly which words changed. Use word-mode diff for precise clause-level change detection.
IN NO EVENT SHALL EITHER PARTY BE
LIABLE FOR ANY INDIRECT, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, WITH A
MAXIMUM LIABILITY NOT TO EXCEED
$100,000 IN THE AGGREGATE.
IN NO EVENT SHALL VENDOR BE
LIABLE FOR ANY INDIRECT, INCIDENTAL,
SPECIAL, OR CONSEQUENTIAL DAMAGES,
WITH A MAXIMUM LIABILITY NOT TO
EXCEED $50,000 IN THE AGGREGATE.
Example 5 — CSV Data Change
An analyst exports a product inventory report from two different dates and compares them to find which items changed. Use line-mode diff with "Ignore Whitespace" enabled.
sku,name,stock,price
A001,Wireless Mouse,120,29.99
A002,USB Hub,45,19.99
A003,Laptop Stand,88,49.99
A004,Monitor Arm,12,89.99
sku,name,stock,price
A001,Wireless Mouse,97,29.99
A002,USB Hub,45,21.99
A003,Laptop Stand,88,49.99
A004,Monitor Arm,0,89.99
A005,Keyboard Tray,30,34.99
Compare Your Own Texts
Paste any two texts and see the same precision diff highlighting applied to your content — instantly, free, and entirely in your browser.
Open TextCompare