JSON Diff
Compare two JSON documents structurally and see every added, removed, and changed value by path, ignoring key order.
Local workspace
Named projects in IndexedDB · Local only — never synced to our servers. Worksp…
Batch workspace
Format multiple files locally in one run.
Comparing API responses, feature flag configs, or test fixtures with a text diff buries the real change in formatting noise. JSON Diff parses both documents and reports every added, removed, and changed value by its JSON Pointer path, ignoring whitespace and key order. The same result exports as an RFC 6902 JSON Patch you can apply in code, or as a unified diff of the key-sorted documents for a pull request. Arrays compare by index, so sort record arrays by a stable id with the JSON Key Sorter when their order isn't meaningful.
Common errors and fixes
Add a === MODIFIED === line between the two JSON documents
Put === ORIGINAL === above the first document and === MODIFIED === above the second, each on its own line.
Modified JSON: Trailing comma before a closing bracket.
Fix the syntax in the document named in the message. Line numbers count from the top of the whole input, markers included.
Every array item shows as changed
An item was inserted or removed near the start of the array, and arrays compare by index. Sort both arrays by a stable field first.
Large IDs show as equal when they differ
JSON numbers beyond 2^53 lose precision in JavaScript. Store IDs such as 9007199254740993 as strings.
Options
| Option | Description |
|---|---|
| Output | The change report lists each difference with its path and old and new values. JSON Patch is a machine-applicable operation list. Unified diff compares the key-sorted documents line by line. |
FAQ
How is JSON Diff different from a text diff?
A text diff compares lines, so reformatting or reordering keys shows up as changes. JSON Diff parses both documents and compares values, so only real data changes are listed.
What does a path like /settings/beta mean?
It's a JSON Pointer (RFC 6901): each segment is an object key or an array index. A / inside a key is written as ~1 and a ~ as ~0.
How are arrays compared?
By position. Inserting an item near the start of an array shifts every later index, so they all show as changed. When order doesn't matter, sort both arrays by a field with the JSON Key Sorter first.
Can I export the differences as a JSON Patch?
Yes. Choose JSON Patch output to get an RFC 6902 operation list that turns the original document into the modified one. A unified diff is available too.
How do I enter the two documents?
Put === ORIGINAL === on its own line above the first document and === MODIFIED === above the second. A marker only counts when it's the whole line, so values that contain the same text are safe.