How to compare two JSON files or API responses
JSON Compare — open the free tool →An API response changed and a test started failing. A config file works on one server but not another. Two translation files are out of sync. In each case you need to see exactly which keys and values differ — and comparing JSON by eye, especially minified JSON, is painful.
Step by step
- Open JSON Compare.
- Paste the original JSON on the left and the new JSON on the right. Minified or formatted both work.
- Click Compare now. Valid JSON is pretty-printed with 2-space indentation so both sides line up.
- Review the highlighted lines. Each changed key or value appears on its own line.
- Copy or download the report to share in a ticket or pull request.
Everything runs in your browser, so tokens, user data and internal configs stay on your machine.
Understanding the result
- Changed value: the same key appears on both sides with the changed part highlighted.
- Added key: appears only on the right.
- Removed key: appears only on the left.
- Moved key: because the comparison works line by line, a key that moved position shows as removed in one place and added in another.
Common problems
One side isn't formatted. That usually means a syntax error, such as a trailing comma, single quotes or a missing bracket. Invalid JSON is compared as plain text, so you still see differences, but fixing the error gives a cleaner result.
Too much noise from key order. If one system sorts keys alphabetically and another doesn't, sort keys on both sides first (many editors and command-line tools can do this), then compare.
Timestamps and IDs always differ. Values like createdAt or request IDs change on every call. Expect them in the diff and focus on the rest.
Where JSON comparison helps
- Checking API responses before and after a deployment.
- Comparing environment configs (staging vs production).
- Reviewing changes in
package.jsonor lock files. - Finding missing keys in translation files.
- Comparing database or analytics exports.
Working with other formats? See YAML Compare, XML Compare or Code Compare.
JSON Compare — open the free tool →Frequently asked questions
Can I compare minified JSON?
Yes. Valid JSON is formatted automatically before comparing, so minified and pretty-printed JSON line up.
Does key order matter?
The comparison is line-based after formatting, so keys in different positions show as removed and added. Keep keys in the same order for clean results.
Is my JSON sent to a server?
No. Parsing, formatting and comparing all happen in your browser.