Text and JSON diff

Paste two versions of a config file, a translation or a contract and see exactly which lines and words changed. Compare JSON with sorted keys, export a unified patch, and keep everything in this tab.

Sign in to save this tool

8 lines

or drop it here

9 lines

or drop it here
Compare as
View
Options

4 changed, 1 added, 0 removed.

4Changed
1Added
0Removed
4Unchanged
1 {2   "name": "checkout-service",3−  "version": "2.4.0",3+  "version": "2.5.1",4−  "retries": 3,4+  "retries": 5,5   "timeoutMs": 5000,6−  "regions": ["eu-west", "me-south"],6+  "regions": ["eu-west", "me-south", "us-east"],7+  "featureFlags": { "instantRefund": true },7−  "notes": "Falls back to the queue when the gateway is down."8+  "notes": "Falls back to the queue when the gateway is unavailable."8 }

How to use it

  1. Paste the original text under Before and the changed text under After, or open a file for each side.
  2. Read the result: removed lines are marked with − and added lines with +, and inside a rewritten line the changed words are highlighted.
  3. Use the options to ignore case, whitespace and indentation, or blank lines, and to hide unchanged lines.
  4. For JSON, choose “JSON (sorted keys)” so key order and formatting do not count as changes.
  5. Switch to the unified patch view to copy the changes or download them as a .diff file.

Supported formats and limits

  • Each side can have up to 20,000 lines and 2 million characters; files up to 2 MB.
  • Up to 2,000 added plus removed lines per comparison (a rewritten line counts as two). Beyond that the tool asks you to split the text instead of freezing the tab.
  • The inline view shows the first 4,000 lines; copy or download the patch for the full result.
  • Windows (CRLF) and Unix line endings are treated as the same.
  • With the ignore options on, the patch shows the compared lines and may not apply cleanly with patch or git apply.
  • A removed line is paired with a similar added line only when they share enough text; otherwise they are shown as a separate removal and addition.

Examples

  • Check what changed between two versions of a config file before a deploy.
  • Review a translator’s edits to an Arabic or English document word by word.
  • Compare two API responses as JSON, ignoring key order.

Frequently asked questions

Is my text uploaded?

No. The comparison runs entirely in your browser, so config files, contracts and API responses stay on your device.

What is a unified diff?

It is the patch format used by git and patch: a few lines of context around each change, with - for removed lines and + for added ones, under @@ headers that give the line numbers.

Why is a change sometimes shown as a removal and an addition?

When the removed and added lines share too little text, pairing them would mark almost every word. Showing them separately is easier to read.

How does the JSON mode work?

Both sides are parsed, object keys are sorted and the JSON is re-indented with two spaces before the line comparison, so only real value changes show up.