Text utilities

JSON Compare

Compare two JSON documents structurally and list changed, added or removed values by pointer.

Text stays in your browserCopy your result
Data workspace
Data workspace

Check delimiters and structure before downloading the output.

See the method

Your source data

Runs on your device

Your transformed data

Your result

Let’s calculate.

Use the Calculate button to see your result.

Your content is processed locally.

How to use this tool

  1. Enter original json, updated json.
  2. Select Update result to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

Parse both documents, ignore object-property ordering, and recursively compare values. Array order remains significant. Change locations use JSON Pointer escaping.

A WORKED EXAMPLE

Using original json = {"name":"Sam","active":false,"roles":["reader"]}, updated json = {"name":"Sam","active":true,"roles":["reader","editor"]}, the result is [ { "path": "/active", "change": "changed", "before": false, "after": true }, { "path": "/roles/1", "change": "added", "after": "editor" } ]. Change these example inputs to match your task; use the method above to check each step.

Understanding your result

No. Whitespace and object-key ordering do not affect this comparison. Different types do: the number 1 differs from the string "1".

What to keep in mind

Array insertions can produce multiple positional changes. Inputs are limited to 20,000 characters; very deep JSON is rejected.

Common questions

Is whitespace a difference?

No. Whitespace and object-key ordering do not affect this comparison. Different types do: the number 1 differs from the string "1".

Is array order ignored?

No. Arrays are ordered sequences, so moving an item can change several index positions.

Methodology maintained by ClarityKit. How these tools are built and checked.