JSON Diff
Open two JSON files or paste two documents to see which fields changed. Ignore object key order while keeping array order significant.
What does JSON Diff do?
JSON Diff compares two JSON documents and highlights structural value changes.
- Primary use: JSON Diff compares two JSON documents and highlights structural value changes.
- Key technical fact: JSON objects are name/value collections, while arrays are ordered sequences, so object and array diffs must be interpreted differently.
- Practical check: Run the formatted or minified output through your parser, tests, or runtime when exact syntax behavior matters.
| Topic | Direct answer | Source |
|---|---|---|
| Direct answer | JSON Diff compares two JSON documents and highlights structural value changes. | IETF RFC 8259 |
| Key fact | JSON objects are name/value collections, while arrays are ordered sequences, so object and array diffs must be interpreted differently. | IETF RFC 8259 |
| Processing model | Runs locally in the browser; no production Node server receives the input. | Browser JavaScript |
Find structural changes between JSON payloads
JSON Diff compares two parsed JSON documents and reports differences at the exact path where they occur. Use it to review API response changes, config updates, test fixtures, feature flag payloads, and saved snapshots.
Objects are compared by key, while arrays are compared by index because array order is meaningful in JSON. Sorting object keys can reduce noise, but it does not make reordered arrays equivalent.
How to use
- Paste one JSON document in each editor, or choose Files and open the original on the left and the revised file on the right.
- Leave the object key order option enabled to ignore reordered keys.
- Choose whether to include unchanged paths. Array items are compared by index.
- Select Compare JSON and inspect the paths marked added, removed or changed.
What is JSON Diff?
JSON Diff is a browser-based comparison tool for structured JSON data. It identifies added keys, removed keys, changed primitive values, object changes, and array index differences.
Both sides must be valid JSON before comparison. The diff is structural rather than textual, so whitespace and object key order are not useful signals unless they affect the parsed data.
Input notes
Paste complete JSON documents on both sides. For line-oriented log entries, extract the JSON portion first. When arrays differ, check whether a shifted item caused many index-level changes.
Try a key reorder and a value change
Paste the original on the left. Try each comparison on the right with key sorting enabled. The first gives zero changes. The second changes only $.limit.
Original
{"enabled":true,"limit":10}
Reordered keys
{"limit":10,"enabled":true}
Changed value
{"limit":20,"enabled":true}
MCP integration
MCP (Model Context Protocol) lets AI agents and apps discover and run Coding.Tools utilities for repeatable conversions, formatting, hashing, and generation workflows.
MCP tool name: json-diff
MCP endpoint: https://coding.tools/mcp
Call tools/list first. Each tool entry includes inputSchema, outputSchema, and examples so an AI agent or client can build valid arguments without guessing.
For tools/call, read result.content[0].text for the display value and result.structuredContent for machine parsing. Tool-level failures return isError: true; protocol failures return a JSON-RPC error.
Example tools/call request:
curl -s https://coding.tools/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"json-diff","arguments":{"input":"{\"user\":{\"name\":\"Alice\",\"role\":\"admin\"}}","options":{"compareTo":"{\"user\":{\"name\":\"Alice\",\"role\":\"editor\"}}"}}}}'
Most text and data tools accept an input string plus optional options. Browser-only image tools are listed for discovery and return a web UI link when they need browser image APIs.