JSON Compare
Compare two JSON objects and find structural or value differences
Compare two JSON documents by meaning, not by lines
When two API responses or config files look almost identical, a text diff can be noisy, especially if keys are ordered differently. This tool parses both documents first and then walks through them together, reporting each place where the data actually differs, along with the path to the field so you know exactly where to look.
Running a comparison
- Paste the first document into JSON A and the second into JSON B. Load Samples fills both boxes with two small objects that differ in a name and an array.
- Click Compare JSON.
- Read the findings in the panel below. If nothing differs, it says the objects are identical; if either input is not valid JSON, a pop-up shows the parser's error.
- Use Clear All to empty both boxes.
How differences are reported
- Added in green: a key that exists in B but not in A, shown with its path, for example .profile.email.
- Removed in red: a key that is in A but missing from B.
- Value change in amber: a primitive that differs, shown as old value then new value.
- Type mismatch: the same path holds different types in each document, such as a string on one side and a number on the other.
- Array length mismatch: lists have different numbers of items; items are then compared position by position.
Because comparison is by key rather than by text, changing the order of keys inside an object does not count as a difference. Whitespace and indentation are also irrelevant.
Practical scenarios
- Checking whether a staging API returns the same fields as production after a deployment.
- Verifying that a config migration script kept every setting and only changed what you intended.
- Spotting which field changed between two saved versions of a record.
- Confirming that a refactored serializer still outputs the same structure.
Limits to keep in mind
Arrays are compared by index, not by identity, so if an item is inserted near the start of a list, later items may all be reported as changed. When array B is longer than array A, the report gives the length mismatch but does not list each extra item; when B is shorter, missing positions appear as type mismatches. Paths for top-level keys begin with a dot. A change of a value from one number to a different number is reported once, at its own path. Comparison happens in the browser, and for a line-oriented view of changes you may prefer the JSON Diff Checker.
Related Tools