// compare JSON objects and see every change
Compare two JSON objects side by side. Highlights added keys in green, removed in red, changed values in yellow, and identical values in grey. Deep nested diff. Free, no sign-up.
Paste the original JSON in the left panel (A) and the modified version in the right panel (B). The tool validates both before comparing.
The diff engine walks both JSON trees recursively and produces a colour-coded side-by-side view. Green keys were added, red were removed, yellow values changed.
The Changes List tab shows every difference as a flat list with the full key path (e.g. user.address.city), old value, and new value β useful for reviewing all changes at a glance.
JSON Diff compares two JSON objects using a deep recursive diff algorithm. It walks the full tree of both objects simultaneously, tracking added keys, removed keys, changed scalar values, and unchanged entries β then renders them in a colour-coded side-by-side tree view. The changes list tab provides a flat summary with full dot-notation key paths. All processing runs in your browser, completely free.
A deep JSON diff recursively walks both JSON trees simultaneously. At each level, it compares the keys present in each object. Keys only in A are marked as removed. Keys only in B are marked as added. Keys in both are compared: if both values are objects or arrays, the algorithm recurses into them. If both values are primitives (string, number, boolean, null), they are compared directly and marked as changed if different, equal if the same.
Arrays are compared element by element by index position β index 0 in A is compared to index 0 in B, index 1 to index 1, and so on. If one array is longer than the other, the extra elements are shown as additions or removals. This index-based comparison is the most transparent approach for diff viewing: it shows exactly which positions changed. It does not attempt to detect moved or reordered elements, as that requires a much more complex algorithm.
The key path is the full dot-notation path from the root of the JSON to the changed value. For example, if the city inside the address inside the user object changed, the path would be user.address.city. For array elements, the path includes the index in square brackets: users[2].email. Key paths make it easy to find the exact location of a change when working with deeply nested JSON.
When a value changes from an object or array to a primitive (or vice versa), the diff cannot recurse into the old and new values in the same way β one is a container and the other is a leaf. In this case, the change is shown as a type change with the old and new values displayed directly. This most commonly happens when a field that previously held an object is replaced by a string ID, or when a scalar is expanded into an object.
Yes. If both inputs are JSON arrays (starting with [), the diff compares them element by element. Each element is compared deeply if it is an object or array, or directly if it is a primitive value. This is useful for comparing ordered lists of records, configuration arrays, or API response arrays where you expect the same elements in the same order.
The diff algorithm is synchronous and runs entirely in the browser's JavaScript engine. For very large JSON objects (hundreds of thousands of keys or deeply nested structures with many levels), the comparison may take a noticeable amount of time and the rendered output may be very long. For typical API responses, configuration files, and document snapshots β which are the most common use cases β the comparison runs in milliseconds.
JSON is the data format that powers modern APIs, configuration files, and document databases. When two versions of a JSON object exist β an API response before and after a backend change, a configuration before and after a deployment, or two database document snapshots β identifying exactly what changed requires either careful manual inspection or a diff tool that understands JSON's nested structure. A line-level text diff misses the semantic structure of JSON; a JSON-aware diff reveals changes at the key and value level.
A text diff tool like git diff compares JSON line by line. If the same JSON is re-formatted or re-ordered, a text diff reports thousands of changes even though the data is identical. A semantic JSON diff compares the structure and values of the parsed objects, not their text representation. Re-ordering keys or changing indentation produces no diff output because the underlying data is the same. This is the correct way to compare JSON: at the data level, not the text level.
Understanding where a change occurred in a deeply nested JSON object requires knowing the full path from the root to the changed value. Dot notation β user.address.city β is the standard way to express this. Array element paths add the index in brackets: items[2].price. The Changes List view in this tool provides full dot-notation paths for every change, making it possible to quickly find and address specific differences in large JSON structures.
API change auditing is one of the most frequent uses for JSON diff tools. When a backend service is updated, comparing an API response from before the update with one from after reveals exactly which fields were added, renamed, removed, or had their types changed. Configuration management is another common use case: comparing a development config with a production config, or comparing two versions of an infrastructure-as-code document, immediately surfaces environment-specific differences and accidental omissions.