JSON

JSON Diff

Compare two JSON documents side by side and see every added, removed, and changed value — by path.

Both documents are parsed and compared locally in your browser. Nothing is uploaded, logged, or stored.

1
Paste the original JSON here, e.g. {"key": "value"}
1
Paste the modified JSON here, e.g. {"key": "new value"}

How to use

  1. Paste the original JSON into the Left panel.
  2. Paste the modified JSON into the Right panel.
  3. Click Compare to run a deep comparison.
  4. Review each difference: added (green), removed (red), and changed (amber) values are listed with their full path.

How JSON comparison works

Unlike a text diff, this tool compares the parsed data, not the raw characters. Both documents are parsed into JavaScript values, then walked recursively: objects are compared key by key, arrays index by index, and primitives with strict equality. That means formatting differences, key order, and trailing whitespace are ignored — only real data differences are reported.

Every difference is reported with a JSON path such as $.config.theme or $.tools[2], so you can jump straight to the field that changed. Type changes are flagged too: "1" (string) vs 1 (number) is a difference, because in most APIs it really is one.

If either side fails to parse, the exact error message is shown instead of a misleading diff. You can clean up messy input first with the JSON Formatter & Validator.

Examples

API response drift

Compare yesterday's API response with today's to spot schema changes: new fields show as added, missing ones as removed, and value changes are listed with old → new.

Config file review

Paste staging and production config files to see exactly which settings differ before you deploy.

Test expectation checks

Compare expected vs. actual output of a function to find the first field where your code diverges from the specification.

Frequently Asked Questions

Is my JSON uploaded anywhere?+
No. Parsing and comparison happen entirely in your browser using built-in JavaScript APIs. You can verify this by using the tool while offline after the page has loaded.
Does key order or formatting affect the result?+
No. The documents are parsed first, so whitespace, indentation, and key order are ignored. Only differences in the actual data are reported.
How are arrays compared?+
Arrays are compared by index: $.items[0] against $.items[0], and so on. Extra items at the end of one array are reported as added or removed. Reordered arrays therefore show as differences — that is usually what you want when diffing data.
Are type differences detected?+
Yes. "1" (string), 1 (number), and true (boolean) are different values and are reported as changed. null vs. a missing key is also distinguished.
What is the size limit?+
There is no hard limit — it depends on your device's memory. Documents of a few megabytes compare instantly; very large files may take a moment.
My JSON is invalid — what now?+
The tool shows the parser error for the affected side. Fix the syntax with the JSON Formatter & Validator and try again.
Can I diff JWT payloads?+
Yes — decode both tokens with the JWT Decoder, then paste the two payloads here to compare claims.

Related Tools

Looking for something else? Browse all tools