JSON Compare Online

Compare two JSON objects and see a detailed diff of all differences, additions, and removals.

A JSON compare tool performs a deep structural diff between two JSON documents — identifying added keys, removed keys, changed values, and type changes at every nesting level. Unlike a plain text diff, it understands JSON structure: {"b":2,"a":1} and {"a":1,"b":2} are correctly reported as identical.

starstarstarstarstar
4.7· 987 ratings
shieldRuns entirely in your browser
cloud_offNo data stored or uploaded
volunteer_activismFree forever
1234567891011121314151617181920
1234567891011121314151617181920
1234567891011121314151617181920

What Is a JSON Compare Tool?

A JSON compare tool performs a deep structural diff between two JSON documents — identifying added keys, removed keys, changed values, type changes, and reordered arrays. Unlike a plain text diff, it understands JSON structure and reports semantic differences rather than textual ones.

This makes it essential for comparing API responses across versions, auditing config changes, verifying test fixtures against expected output, or understanding what changed between two data snapshots. If either JSON has errors, validate them with our JSON Validator before comparing.

For sorting keys before comparison, use our JSON Sorter to normalise key order first. For editing one of the documents, use our JSON Editor.

Common Use Cases

  • check_circleCompare API responses from v1 and v2 endpoints
  • check_circleDiff a JSON config file before and after a deployment
  • check_circleVerify a transformed JSON output matches expected test fixture
  • check_circleSpot changes in a JSON schema between two releases
  • check_circleCompare two database exports to find changed records
  • check_circleAudit JSON environment configs across staging and production

How to Compare JSON Online – Step by Step

1

Paste two JSON objects

Copy your first JSON into Input A and your second JSON into Input B. Both panels accept any valid JSON — objects, arrays, or primitives.

2

Click Compare

Press Compare. The tool performs a deep structural diff instantly, comparing every key and nested value recursively in your browser.

3

Read the diff output

The output shows every difference: + for additions, - for removals, and ~ for changed values — with the full key path to each change.

When Should You Compare JSON?

A structural JSON diff is far more reliable than a plain text diff whenever key order, whitespace, or formatting differences would create false positives.

api

API Version Comparison

Compare responses from v1 and v2 of an API to discover exactly which fields were added, removed, or renamed between versions.

deployed_code_update

Deployment Auditing

Diff config JSON before and after a deployment to confirm that only the expected keys changed — catch unintended modifications before they reach production.

fact_check

Test Fixture Verification

Compare a function's JSON output against the expected test fixture to validate that the transformation is producing the correct result.

schema

Schema Change Detection

Compare two versions of a JSON Schema to find added properties, changed types, or removed required fields before updating API consumers.

difference

Data Export Auditing

Compare JSON exports from two time periods or environments to identify which records changed, which were added, and which were deleted.

history

Configuration History

When debugging a regression, compare the current config JSON against a known-good snapshot to quickly identify what changed.

JSON Compare vs JSON Validator vs JSON Editor

Different stages of the JSON workflow require different tools.

FeatureJSON CompareJSON ValidatorJSON Editor
Primary purposeFind differences between two JSONDetect syntax errorsModify JSON structure
InputsTwo JSON documentsOne JSON documentOne JSON document
Understands JSON structure✓ Yes (semantic diff)✓ Yes✓ Yes
Key order insensitive✓ YesN/AN/A
OutputDiff report (+/-/~)Error messagesModified JSON
Best forChange detection & auditingFixing broken JSONUpdating JSON data
difference

Deep Structural Diff

The comparison analyses every key and value recursively — detecting additions, deletions, type changes, and value changes at every nesting level.

sort

Key-Order Insensitive

JSON objects are unordered by specification. Our diff correctly treats {"a":1,"b":2} and {"b":2,"a":1} as identical — no false positives from key reordering.

lock

Fully Private

Both JSON documents are compared in your browser. Neither document is uploaded to or stored on any server.

verified

JSON Has Errors? Validate Both First

Comparison requires both inputs to be valid JSON. If either fails, use our JSON Validator to find syntax errors, or our JSON fix guide for common repairs.

Validate JSON

Frequently Asked Questions

How is JSON compare different from a text diff?

A text diff compares lines of characters. A JSON compare understands structure — it detects that {"b":2,"a":1} and {"a":1,"b":2} are identical, whereas a text diff would flag them as different because the key order differs.

Does key order matter when comparing JSON?

No. JSON objects are unordered by specification (RFC 8259). Our comparison treats {"a":1,"b":2} and {"b":2,"a":1} as equal — key order is not semantically significant in JSON.

Does array order matter in the comparison?

Yes. JSON arrays are ordered sequences. [1,2,3] and [3,2,1] are different arrays. The comparison reports each positional difference between the two arrays.

What do the +, -, and ~ symbols mean?

+ means a key or value is present in JSON B but not JSON A (added). - means it is in JSON A but not JSON B (removed). ~ means the value changed between A and B.

Can I compare two JSON files by uploading them?

You can paste the contents of any JSON file into either panel. The tool handles JSON of any size and complexity entirely in your browser.

Is this JSON compare tool free and private?

Completely free with no account required. Both JSON documents are compared locally in your browser — neither is uploaded to or stored on any server.

Go Deeper

Related JSON Learning Resources

verified_user

About This Tool

Built by OpenFormatter · Last updated

differenceRFC 8259 key-order insensitive diff
lock100% browser-based — zero uploads
starFree forever, no account needed
JSON Compare Online – Diff Two JSON Objects Free