Structural, key-order-insensitive diff of two JSON documents.
The JSON Diff tool compares two JSON documents and lists exactly what was added, removed or changed, with the path of each difference. It compares the data rather than the text, so reordered keys and different formatting do not count as changes. Use it to compare API responses, config versions or test fixtures.
A text diff compares files line by line, so two JSON documents with the same data but different key order or indentation look very different. A semantic diff parses both documents first and compares the values. Objects are compared key by key, so the order of keys does not matter. Arrays are compared by position: the first element on the left is compared with the first on the right, and so on, so inserting an item at the start of an array makes every later position look changed. Each difference is reported with a JSONPath such as $.c.d and one of three kinds: added (only in the right document), removed (only in the left) or changed (present in both with different values, including a change of type, such as 1 and "1").
No. Objects are compared by key, so the same data in a different key order is identical.
By position. Element 0 is compared with element 0, element 1 with element 1, and so on. Extra elements on one side are reported as added or removed.
Because items are matched by position, every later item is compared with a different item than before. Sort both arrays the same way first if the order is not meaningful.
$ is the root, .key selects an object property and [n] selects an array element, for example $.users[0].name. Keys with unusual characters use bracket form with quotes.
No. Both documents are compared in the page and nothing is sent anywhere.