Structured Data
JSON Comparator
Compare two JSON documents in your browser. Lists changed, added, and removed keys by path, and ignores key order and whitespace.
This tool runs open-source code from OmniTools (MIT License). See open-source credits.
The comparison ignores whitespace and object key order. It compares arrays by position and numbers by exact value.
Text lists differences by dotted path. JSON returns a flat object with those paths as keys.
- See which settings changed between two exported configuration files.
Sources: RFC 8259: JSON objects and values
Compare changed values and missing fields
Input: First JSON input: {"user":{"id":7,"role":"admin"},"tags":["a"]}; Second JSON input: {"user":{"id":"7","role":"viewer"},"tags":["a"],"active":true}
Settings: Result format: Text (the default)
Result: user.id: Mismatch: 7 != "7" user.role: Mismatch: "admin" != "viewer" active: Missing in first JSON
user.id differs because the number 7 became the string "7". The equal tags arrays produce no line.
Choose text paths or JSON output
- Paste the original into First JSON input and the changed document into Second JSON input.
- Choose Result format, then inspect changed, added, and removed paths.
Duplicate keys and array order
- The report is not an executable JSON Patch.
- An empty input counts as an empty object.
- The parser accepts trailing commas. Use JSON Validator when you need strict syntax checking.