JSON Diff Checker
A JSON diff tool compares two JSON objects and identifies all differences: added keys, removed keys, and changed values. Differences are shown at each JSONPath location (e.g., $.config.theme). This is useful for comparing API responses, configuration files, database records, or any structured data. Arrays are compared element-by-element by index position.
Compare two JSON objects and see all differences. Shows added, removed, and changed values with JSONPath locations. Supports nested objects and arrays. Color-coded diff output.
JSON Inputs
How to Use
- 1
Paste original JSON
Paste the original (baseline) JSON object into the left input area
- 2
Paste modified JSON
Paste the modified (updated) JSON object into the right input area
- 3
Review differences
See all differences color-coded: green for added, red for removed, yellow for changed values with JSONPath locations
- 4
Copy the diff
Click "Copy diff" to export the list of all changes in a readable text format
Frequently Asked Questions
- How does JSON diff comparison work?
- JSON diff compares two JSON objects recursively. It walks both object trees simultaneously, checking every key and value. It reports three types of differences: added (key exists only in the right/modified JSON), removed (key exists only in the left/original JSON), and changed (key exists in both but values differ).
- How are arrays compared in JSON diff?
- Arrays are compared element-by-element by index position. If the left array has 3 elements and the right has 5, elements at indices 0-2 are compared for changes, and elements at indices 3-4 are reported as added. This is positional comparison — it does not try to match elements by content.
- What is JSONPath in diff output?
- JSONPath is a notation for identifying specific values in a JSON document. The root is $, object keys use dot notation ($.config.theme), and array elements use bracket notation ($[0], $.items[2]). Each diff entry shows the exact JSONPath where the change occurred.
- Can I compare nested JSON objects?
- Yes. This tool recursively compares all levels of nesting. A change deep inside a nested structure like $.servers[0].config.port will be reported with its full path. Both objects and arrays can be nested to any depth.
- What is JSON diff used for?
- Common uses include: comparing API responses before and after changes, reviewing configuration file differences, debugging data transformations, comparing database records, verifying data migration results, and reviewing changes in CI/CD pipelines.
- How do I read the diff output?
- Green entries with + are additions (new keys/values). Red entries with - are removals (deleted keys/values). Yellow entries with ~ are modifications showing the old value crossed out and the new value. Each entry shows the JSONPath location of the change.