All tools

JSON Path Diff

AI / Agent

Structurally diff two JSON objects and return a flat list of added, removed, changed, and unchanged paths: designed for AI agent pipelines.

Checking exactly which fields an LLM agent modified between two tool-call states is a different job from a human-facing visual diff. It needs a flat, machine-readable list your pipeline can assert against, which is exactly what this outputs: every path in two JSON objects marked added, removed, changed, or unchanged, ready to feed into a downstream validation step. A path counts as changed if it exists in both objects with different values, added if only in the second, removed if only in the first. Array elements are diffed by index path (like `items.2.name`), so a reordered array will show as changes even though the same values are still present elsewhere. This is a different tool from the JSON category's JSON Diff, which is built for humans reviewing a visual, side-by-side comparison rather than a pipeline consuming a flat path list.

jsondiffcomparedeltaagentpatch

How to use JSON Path Diff

  • 1.Paste two JSON objects (e.g. before/after an agent's tool call) to get a flat list of every added, removed, changed, and unchanged path.
  • 2.Use the flat path output to programmatically check which specific fields an LLM agent modified, instead of diffing entire objects.
  • 3.Feed the diff result into a downstream validation step to assert that only expected paths changed between two pipeline steps.

Frequently asked questions

Does this run in my browser or on a server?
Diffing runs entirely client-side — neither JSON object is uploaded.
How are array differences represented?
Array elements are diffed by index path (e.g. `items.2.name`), so reordering array items will show up as changes even if the same values are still present elsewhere in the array.
What counts as "changed" versus "added"/"removed"?
A path is "changed" if it exists in both objects with different values, "added" if it only exists in the second, and "removed" if it only exists in the first.
Is this the same as a visual JSON diff tool?
No — this outputs a flat, machine-readable list of path-level changes designed for programmatic consumption (like an agent pipeline), rather than a side-by-side visual diff for humans.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/diff-json \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"a":{"name":"Alice","role":"admin","active":true},"b":{"name":"Alice","role":"user","city":"NYC"}}'

Get an API key from your dashboard · Full API docs →