JSON Compare
Compare two JSON documents key by key and see every difference: changed values, type mismatches and keys missing on either side.
Differences
| Property | JSON 1 | JSON 2 | Comment |
|---|---|---|---|
name |
"Kiran" |
"Kiran" |
Same |
age |
"15" |
15 |
Type mismatch (string vs number) |
city |
"New York" |
"New York" |
Same |
address |
{"state":"KA"} |
"Bengaluru" |
Type mismatch (object vs string) |
tags[0] |
"a" |
"a" |
Same |
tags[1] |
"b" |
missing | Missing in JSON 2 |
grade |
missing | "2" |
Missing in JSON 1 |
How the comparison works
- Every key in either document is checked, including nested objects. Array items are compared by position:
tags[0],tags[1]… - Type mismatch means the same key holds different kinds of value, like
"15"(text) and15(number). Strings are shown in quotes so you can tell them apart. - Keys with dots or spaces are shown as
["a.b"], so they can't be confused with nested keys. - Key order doesn't matter:
{"a":1,"b":2}and{"b":2,"a":1}are the same.
JSON Compare: frequently asked questions
How do I compare two JSON files?
Paste the first JSON on the left and the second on the right, then press Compare JSON. Every key in either document is listed with both values and whether they match.
What is a type mismatch?
The same key holds different kinds of value in each document, for example "15" (text) in one and 15 (a number) in the other. They look alike but most programs treat them differently.
Does key order matter?
No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are the same. Array items are compared by position, because order matters in arrays.
Can I see only the differences?
Yes. Tick the filters, such as Value mismatch or Missing in JSON 2, and compare again to show only those rows. Blanks shows rows where either side is missing, null or empty.