Skip to content
SPCXTools

JSON Compare

Quickly find differences between two JSON objects with a detailed path-by-path comparison.

Runs locally — files never leave your device

Loading tool…

How to use JSON Compare

  1. 1Paste your original JSON into the left panel and the modified JSON into the right panel.
  2. 2The tool instantly parses the data and displays a summary of added, removed, and changed fields.
  3. 3Check "Ignore array order" if you want to compare array contents regardless of their sequence.
  4. 4Review the detailed list of changes, showing the exact JSON path and the old/new values.
  5. 5Use the Copy button to copy a plain-text report of the differences to your clipboard.

A fast, private JSON difference checker

When working with complex data structures, spotting a single modified value or a missing key can be incredibly frustrating. This JSON compare tool is designed to instantly analyze and highlight the exact differences between two JSON payloads. Instead of reading through thousands of lines of code, you get a clean, structured report of exactly what changed.

Because this tool runs entirely in your web browser, it is a completely private way to run a JSON diff online. Your data is never uploaded to a server or stored in a database. You can safely paste proprietary API responses, customer data payloads, or sensitive environment configurations without risking a data leak.

How deep JSON comparison works

If you want to compare two JSON files, using a standard plain-text Diff Checker often leads to false positives. Plain text tools compare data line-by-line. If your modified JSON has different indentation, or if the keys in an object are simply in a different order, a text diff will flag the entire block as changed.

This tool works differently. It parses the text into actual JavaScript objects and performs a deep, recursive comparison of the data structure itself. It ignores whitespace, indentation, and object key order. If {"status": "ok", "code": 200} becomes {"code": 200, "status": "ok"}, the tool recognizes them as perfectly identical.

When it does find a difference, it generates a precise path to the change using standard dot notation and bracket syntax. For example, if the third tag in an array changes, the tool will point you directly to tags[2] rather than just highlighting a random line in a massive file.

Handling arrays: strict vs. order-agnostic

One of the most common challenges in a JSON difference checker is dealing with arrays. Sometimes, the order of items in an array is strictly meaningful. Other times, an array is just an unordered list of items, and you only care if the contents match.

By default, this tool compares arrays strictly by index. It checks if the first item in the original matches the first item in the modified, and so on.

If you check the Ignore array order option, the tool changes its behavior. It serializes and alphabetically sorts the contents of both arrays before comparing them. This means if your original array is ["apple", "banana"] and your modified array is ["banana", "apple"], the tool will report zero changes. This feature is invaluable when comparing API responses from databases that do not guarantee a specific sort order.

Common use cases

Debugging API responses. When an API endpoint suddenly breaks, comparing the old working response to the new failing response is the fastest way to find the culprit. Paste both payloads to instantly see if a key was renamed, a data type changed from a string to an integer, or a nested object was removed.

Reviewing configuration files. Modern applications rely heavily on JSON configuration files, such as package.json, tsconfig.json, or cloud deployment templates. Before committing a change, use this tool to verify exactly which dependencies were updated or which settings were toggled.

Database record audits. Document databases like MongoDB store records as JSON-like structures. If you need to audit how a specific user profile or document has changed over time, comparing the historical JSON export with the current state provides a clear audit trail of added, removed, and modified fields.

Understanding the output

Once you paste valid JSON into both panels, the tool generates a summary and a detailed list of changes:

  • Added (+): Keys or array items that exist in the modified JSON but not in the original. These are highlighted in green.
  • Removed (−): Keys or array items that exist in the original JSON but are missing from the modified version. These are highlighted in red.
  • Changed (~): Keys that exist in both, but have different values (e.g., a string was updated, or a boolean flipped from true to false). These are highlighted in yellow, showing both the old and new values.

If you need to share the results of your comparison with a colleague or paste them into a bug report, you can use the Copy button. This copies a clean, plain-text summary of every changed path and its associated values.

For further data manipulation, you might want to format messy data first using the JSON Formatter, or once you have finalized your JSON structure, generate type definitions using the JSON to TypeScript converter.

Frequently asked questions

How does the JSON difference checker handle arrays?
By default, arrays are compared strictly by their index order. If you check "Ignore array order", the tool sorts arrays by their contents before comparing. This is useful when the order of items doesn't matter, but the data itself should be identical.
Is my JSON data sent to a server?
No. All parsing and comparison happen locally in your browser using JavaScript. Your data is never uploaded, making this tool completely safe for sensitive API responses, database exports, or private configuration files.
What happens if my JSON is invalid?
The tool will display an error message below the text box indicating where the parsing failed. You must provide valid JSON in both panels for the comparison to run.
Can I swap the original and modified JSON?
Yes, click the Swap button to instantly switch the left and right panels. This reverses the perspective of what is considered "added" or "removed".
How are nested objects compared?
The tool recursively traverses nested objects and arrays, generating a precise path (like "user.address.city" or "items[2].id") for every difference it finds.
Why use this instead of a standard text diff tool?
Standard text diffs compare lines of text. If the same JSON object has its keys in a different order, a text diff will show it as a massive change. A JSON compare tool parses the actual data structure, so it knows that {"a":1, "b":2} and {"b":2, "a":1} are completely identical.