Paste the first document into the First JSON editor.
Paste the document to compare into the Second JSON editor. You can also load either side with Select files.
Read the Differences box. It updates after each edit and lists one difference per line, or shows No differences found when the documents match.
Click Copy to clipboard, or Download to save the differences as a .txt file.
Examples
Missing key
First JSON: {"name": "John", "age": 30}. Second JSON: {"name": "John"}. Differences: age: Missing in second JSON.
Changed nested value
First JSON: {"person": {"name": "John", "age": 30}}. Second JSON: {"person": {"name": "Jane", "age": 30}}. Differences: person.name: Mismatch: John != Jane.
Changed array item
First JSON: {"numbers": [1, 2, 3]}. Second JSON: {"numbers": [1, 2, 4]}. Differences: numbers.2: Mismatch: 3 != 4.
Good to know
Nested objects and arrays are compared recursively. Each difference is labeled with a dot-separated path, and array positions appear as numbers, as in numbers.2. The top level should be an object or array: two different bare values such as 1 and 2 give No differences found.
Array items are compared by position, so the same items in a different order are reported as mismatches.
Values are compared with strict equality and printed without quotes, so the number 1 and the string "1" show up as a mismatch that reads 1 != 1.
A comma followed only by whitespace and a closing } or ] is removed before parsing, so trailing commas do not cause an error. This also happens inside string values, so "x,]" and "x]" compare as equal. An empty editor is treated as {}.
The two input editors use the Monaco code editor. The page downloads it from cdn.jsdelivr.net when an editor loads.
Frequently asked questions
Does the order of keys matter?
No. Each key is looked up by name in the other object, so {"a":1,"b":2} and {"b":2,"a":1} give No differences found. The order of array items does matter.
What do Missing in first JSON and Missing in second JSON mean?
The key exists in only one document. Missing in second JSON means the key is in First JSON but not in Second JSON, and Missing in first JSON means the reverse.
What happens if one of the inputs is not valid JSON?
No comparison is made. The Differences box shows Error: followed by First JSON or Second JSON and the parser's message for each input that failed to parse.