JSON Compare: Find Added, Deleted and Changed Keys
Paste the original JSON on the left and the changed JSON on the right. The tool parses both and lists every key that was added, deleted or changed, by its dot path.
Runs in your browser: your files and text are not uploaded. Free, no account needed.
Last updated: · Reviewed by the QuickTooly Team
How the comparison works
Semantic Diff, Not a Text Diff
Both inputs go through JSON.parse first. If either side is not valid JSON, the error appears under that box and nothing is compared. Because the parsed data is compared, indentation, line breaks and key order make no difference. To see line-by-line changes in the text itself, use a text diff instead.
How Keys and Arrays Are Matched
- Objects are walked key by key. Each value gets a path such as
meta.version. A path only on the right is Added, only on the left is Deleted, and on both sides with a different value is Modified. - Key order is ignored.
{"a":1,"b":2}and{"b":2,"a":1}are identical. - Arrays are compared as one value, in order. Any change inside an array, including a different order, reports the whole array at its path as Modified.
["a","b"]and["b","a"]differ. - Types must match.
1and"1"are different values. - A top-level array is matched by index, so paths look like
0.nameand1.name.
Worked example
Left:
{"name":"Ada","tags":["a","b"],"meta":{"v":1}}Right:
{"tags":["b","a"],"name":"Ada","meta":{"v":2},"beta":true} Result: 3 differences. Added: beta = true. Modified: tags (same items, new order) and meta.v (1 to 2). name moved but is not reported.
Edge Cases
- Top-level values that are not objects or arrays. Comparing
5with6, ornullwith{}, reports one Modified entry at the path(root). - Empty objects. An empty object is a value of its own, so
{"a":{}}compared with{}reportsaas Deleted. - Keys that contain dots. Such a key is shown in brackets, as in
["a.b"], so{"a.b":1}and{"a":{"b":1}}are reported as different keys.
JSON Compare Questions
Why is a whole array marked as modified when only one item changed?
Arrays are not walked item by item. The tool compares the full array at that path and shows the old and new array side by side.
Can it ignore array order?
No. Arrays are compared in order. Sort both arrays the same way before comparing if order does not matter to you.
Does it accept JSON with comments or trailing commas?
No. Input is parsed with the standard JSON.parse, which rejects comments, trailing commas and single-quoted strings.
Related Tools
- Text Diff: compare the raw text line by line when formatting or key order matters to you.
- JSONPath Evaluator: pull out one part of a large document before comparing it.
- YAML to JSON Converter: convert YAML config files to JSON so they can be compared here.