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.

Example 1 · Document Revision
Blog post introduction — word-mode diff
Original (v1)
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.
Revised (v2)
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.
What the diff shows: Word-mode diff highlights 6 word-level changes: "changed" → "transformed", "the way" → "how", "now" → "increasingly", added "globally", "quickly" → "in real time", "large" → "profound", and "the news industry" → "journalism and media". Each change is highlighted inline so the writer can evaluate them individually rather than re-reading the entire paragraph.

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.

Example 2 · Code Change
JavaScript function refactor — line-mode diff
Original
function calculateTotal(price, qty) {
  var total = price * qty;
  return total;
}
Revised
function calculateTotal(price, qty) {
  if (price < 0 || qty < 0) {
    throw new Error('Negative values not allowed');
  }
  const total = price * qty;
  return total;
}
What the diff shows: Two lines added (the guard clause and its error throw), and one line modified (var totalconst 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.

Example 3 · JSON Config
App config before/after deploy — JSON diff
Before deploy
{
  "env": "staging",
  "maxConnections": 10,
  "timeout": 30,
  "debug": true,
  "logLevel": "info"
}
After deploy
{
  "env": "production",
  "maxConnections": 50,
  "timeout": 30,
  "debug": false,
  "logLevel": "warn"
}
What the diff shows: Four keys changed: 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.

Example 4 · Contract
Limitation of liability clause — word-mode diff
Original clause
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.
Counterparty revision
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.
What the diff shows: Three significant changes: (1) "EITHER PARTY" narrowed to "VENDOR" — removing mutual liability limitation and applying it only to one party; (2) "SPECIAL," inserted — broadening the excluded damage types; (3) the liability cap halved from $100,000 to $50,000. These are material changes that would be easy to miss in a line-level scan but are immediately visible in a word-mode diff.

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.

Example 5 · CSV Data
Inventory report — line-mode diff
Monday export
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
Friday export
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
What the diff shows: Three existing rows changed: A001 stock dropped from 120 to 97 (sold 23 units), A002 price increased from $19.99 to $21.99 (price change), A004 stock went to 0 (out of stock). One new row was added: A005 (Keyboard Tray) is a new product. A003 is unchanged. The intra-line diff pinpoints exactly which column value changed in each row — the analyst does not need to scan every cell manually.

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