JSON Diff
Compare two JSON data structures to identify differences in keys, values, and array elements.
Run tool
This online comparison utility parses two separate JSON snippets and highlights structural discrepancies between them. Rather than performing a simple line-by-line text diff, the tool analyzes the underlying data trees to identify modified key values, newly added or deleted object properties, and alterations in array lengths or element positions.
To perform a comparison, paste your original data structure into the first text area and your updated data structure into the second text area. Once evaluated, the output panel indicates whether both structures are identical and lists the total count of detected differences alongside specific path changes.
If either input field is left empty or contains only whitespace, the tool indicates that the payloads do not match and shows zero structural diff entries. When an input contains malformed syntax, the tool highlights parsing errors so you can correct your payload and re-run the inspection.
Instructions
- Enter or paste your primary JSON text into the first input area.
- Enter or paste the secondary JSON text into the second input area.
- Submit the comparison to parse and evaluate both payloads.
- Inspect the result summary to check structural identity, difference counts, and detected changes.
Examples
- Comparing {"name": "Alice", "age": 30} and {"name": "Alice", "age": 31} reports one changed value at key 'age'.
- Comparing {"items": [1, 2]} and {"items": [1, 2, 3]} detects an increased array length and a new element at index 2.
FAQ
What happens if one of the inputs contains invalid JSON?
If either field contains malformed JSON, the comparison cannot parse the structure. The output shows specific parsing error details so you can fix the syntax.
Does key ordering in objects affect the comparison?
Because the tool parses the inputs into data structures before comparison, object keys with identical names and values match even when arranged in a different order in the source text.
What does the tool report if an input field is left empty?
If either input is blank or whitespace only, the tool reports that the two inputs are not identical, with zero structural diff entries.
Can this tool merge or automatically fix differences between payloads?
No. The tool inspects and reports differences between two JSON structures, but it does not merge payloads or generate patch files.