JSON Diff

Paste two JSON payloads to find structural differences by object path, array index, and value.

Original JSON
1
Changed JSON
1
Diff Output
1
Added0
Removed0
Changed0
Unchanged0
No JSON differences to display yet.
0 characters 0 lines

JSON Diff

JSON Diff compares two JSON documents and reports differences at precise object paths and array indexes.

The parser validates both inputs before comparing, then shows a plain-text diff and a compact visual summary that can be copied into reviews or issue comments.

How to use

  1. Paste the original JSON into the left editor.
  2. Paste the changed JSON into the right editor.
  3. Optionally include unchanged paths for a complete audit trail.
  4. Click Compare JSON to generate the path-by-path diff.

What is this tool?

A JSON diff highlights structural changes between two payloads, including added keys, removed keys, changed primitive values, and array index differences.

It is useful for API response reviews, configuration changes, test fixtures, and debugging unexpected payload changes.

Input notes

Both inputs must be valid JSON. Object key order does not affect equality, while array order is compared by index because array order is meaningful in JSON.

Example

A changed role is reported at its JSON path:

Original
{"user":{"name":"Alice","role":"admin"}}

Changed
{"user":{"name":"Alice","role":"editor"}}

Diff
[changed] $.user.role
- "admin"
+ "editor"

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.