JSON Compare

Compare two JSON objects side by side and instantly see every mismatch — differing values, missing or extra keys, and type conflicts are each color-coded for clarity. Scroll both panes in sync, toggle line numbers, or switch to compact mode for dense payloads. The diff runs entirely in your browser with no data sent to any server.

JSON Object 1

JSON Object 2

What is JSON Compare Tool?

API responses change between versions. Config files drift between environments. Test fixtures diverge from actual output. Finding exactly what changed between two JSON documents — not just that something changed, but which specific keys were added, removed, or got different values — is the job of a diff tool that understands JSON structure, not just text. This comparator performs a structural diff: added keys are highlighted in green, removed keys in red, and changed values in amber, with the full key path shown for every difference. Semantic mode ignores key ordering, so objects with the same keys in different order compare as identical. Specify keys to ignore — timestamps, request IDs — to focus the diff on data that actually matters. Export the result as an RFC 6902 JSON Patch document for programmatic application.

How to Use

  1. 1

    Paste Both JSON Documents

    Paste the "before" JSON into the left panel and the "after" JSON into the right panel. Both inputs are validated independently — syntax errors in either panel are shown before comparison.

  2. 2

    Configure Diff Options

    Choose between structural diff (highlights added, removed, and changed keys) and semantic diff (ignores key order, normalises whitespace). Optionally ignore specific keys (e.g., timestamps, IDs) that always differ.

  3. 3

    View the Differences

    Click "Compare". Added keys are highlighted in green, removed keys in red, and changed values in amber. The diff is shown inline alongside both documents or as a unified change list.

  4. 4

    Copy the Diff Report

    Copy the diff output as a formatted text report for pasting into a Jira ticket, GitHub issue, or pull request comment — or download the diff as a .json patch file.

Common Use Cases

API Response Diffing

Compare the JSON response from two API versions or two environments (staging vs production) to verify that a deployment did not introduce unexpected field changes or regressions.

Configuration Auditing

Diff JSON config files between environments — development, staging, and production — to confirm only intentional differences exist and catch accidental overrides before they reach production.

Test Fixture Validation

Compare actual test output JSON against expected fixture JSON to identify exactly which fields differ, rather than reading a raw failed assertion in a terminal.

Data Migration Verification

After migrating records between databases or services, compare source and destination JSON exports field-by-field to confirm data integrity and completeness with no silent data loss.

Conversion Examples

Spot Added & Removed Keys

Compare two API response versions to see what fields changed.

Input JSON

Left:  {"id":1,"name":"Alice","role":"user","email":"alice@example.com"}
Right: {"id":1,"name":"Alice","role":"admin","verified":true}

Output CSV

~ role: "user" → "admin"
- email: "alice@example.com"  (removed)
+ verified: true              (added)

Nested Object Diff

Deeply nested changes are shown at their exact path.

Input JSON

Left:  {"user":{"address":{"city":"London","zip":"EC1A"}}}
Right: {"user":{"address":{"city":"Manchester","zip":"M1 1AE"}}}

Output CSV

~ user.address.city: "London" → "Manchester"
~ user.address.zip:  "EC1A"   → "M1 1AE"

Frequently Asked Questions