Diff two JSON configs to find what actually changed
Environment configs and API responses drift apart subtly. A structural JSON diff lists added, removed, and changed paths.
Tools used in this guide
The job
Two config files that "should be the same" behave differently, or a new API response shape breaks a consumer. Comparing them as text flags every key order and formatting difference; comparing them structurally reports the paths that changed.
Worked example
Left: {"name": "app", "options": {"debug": false, "retries": 3}}. Right: the same but with "debug": true and a new "options.timeout": 30. The diff lists exactly two entries: changed at $.options.debug (false → true) and added at $.options.timeout.
Paste one JSON per side — whitespace, key order, and formatting do not matter. Both sides must parse as valid JSON first.
- Objects match by key; arrays match by index, so reordered array items report as changes.
- Each side is limited to 2 MB. Values compare with strict equality (1 and "1" differ).
When it helps most
Auditing a config copy between environments, checking what a dependency update added to a lock file section, or reviewing a coworker's settings change. For loose text or non-JSON documents, use the word diff instead.