How to Compare Two JSON Files and See What Changed
Updated 2026-06-21
To compare two JSON files, paste the original into one side, the updated version into the other, and use a structural diff tool that reports every added, removed, and changed key. Unlike a plain text comparison, a structural diff ignores reformatting and key order, so you see only the differences that actually matter.
Why a structural diff beats a text diff
If you run two JSON files through a line-based text comparison, you get noise. Reordering keys, changing indentation, or switching from spaces to tabs all show up as "changes" even though the data is identical. JSON has no required key order, so two objects with the same keys in a different sequence are equivalent.
A structural diff parses both documents first, then walks them recursively and compares values by their location, not their position in the file. That means:
- Object keys are matched by name, so key order is ignored.
- Arrays are compared by index (position), so the first item is compared to the first item.
- Each difference is reported at a precise path like config.retries or tags[0].
The result is a clean list of what genuinely differs, grouped into three buckets: added, removed, and changed.
Step by step
- Open the JSON Diff & Compare tool.
- Paste your original (old) JSON into the left pane and the updated (new) JSON into the right pane. Both sides are parsed live as you type, so a stray comma or missing bracket is flagged immediately with the exact error.
- Read the summary counts at the top: how many keys were added, removed, and changed.
- Scan the grouped results. A green plus marks keys that exist only on the right, a red minus marks keys that exist only on the left, and an amber marker shows changed values with the old value above the new one.
- Use Swap sides if you pasted them in the wrong order, or Copy diff / Download to save a plain-text summary for a pull request or commit note.
A worked example
Compare a version 1.2.0 config against a 1.3.0 one and you might see: version changed from 1.2.0 to 1.3.0, config.retries changed from 3 to 5, config.backoff added with value exp, license added as MIT, and deprecated removed. Every entry points to the exact path, so you can act on each one without hunting through the raw files.
Common pitfalls
- Trailing commas and comments. Strict JSON allows neither. If a side won't parse, the error message names the spot to fix.
- Numbers as strings. The value 5 and the string "5" are different types, so they register as a change. That is usually what you want to catch.
- Large files. Each side accepts up to about 2 MB, which covers realistic config files and API payloads.
Everything happens locally in your browser. Both documents are parsed and compared on your device with no signup and nothing uploaded — safe for configs, API responses, and other sensitive data.
Ready to see what changed? Open the JSON Diff & Compare tool and paste your two files.