JSON Diff Checker

Compare two JSON objects and highlight added, removed, and changed keys.

JSON compareNested diffLocal text processingLocal analysis

Total diffs

8

Excludes unchanged rows.

Added

2

New keys or values.

Removed

1

Deleted keys or values.

Changed

4

Value changes.

Type changes

1

Number vs string, etc.

Array changes

0

Index-based changes.

Diff Results

$.items[0].price

changed

Value changed from 10 to 12.

Original value

10

Updated value

12

$.items[2]

added

Array item was added.

Original value

undefined

Updated value

{
  "price": 30,
  "sku": "C3"
}

$.metadata

added

Key was added in the updated JSON.

Original value

undefined

Updated value

{
  "source": "api-v2"
}

$.settings.notifications

changed

Value changed from true to false.

Original value

true

Updated value

false

$.settings.theme

removed

Key was removed from the updated JSON.

Original value

"light"

Updated value

undefined

$.user.id

type changed

Type changed from number to string.

Original value

123

Updated value

"123"

$.user.name

changed

Value changed from "Alice" to "Alicia".

Original value

"Alice"

Updated value

"Alicia"

$.user.profile.plan

changed

Value changed from "Free" to "Pro".

Original value

"Free"

Updated value

"Pro"

Dynamic Comparison Insights

Both JSON inputs are valid and ready to compare.
Found 4 changed values, 2 added keys, and 1 removed keys.
Key order is ignored, so reordered object properties are not counted as changes.
Arrays are compared by index, so inserted items may shift later differences.
Strict type comparison is enabled, so 1 and "1" are treated as different.

How JSON Diff Checking Works

JSON diff checking compares two parsed JSON structures.

The tool validates both inputs before comparison, then walks nested objects and arrays recursively.

Differences are shown by JSON path so you can see exactly where the data changed.

Structural vs Text-Based Comparison

Structural diff

Compares parsed objects and can ignore whitespace and key order.

Text diff

Compares characters and lines, useful when exact formatting matters.

Objects, Arrays, Keys, and Value Changes Explained

Objects contain key-value pairs.
Arrays contain ordered items.
Key order usually does not change JSON meaning.
Array order usually matters.
A value can change without the key changing.
A type change can matter, such as number vs string.
null, false, 0, and empty string are different values.

API, Config, and Debugging Use Cases

Comparing API responses
Checking config changes
Reviewing JSON settings
Debugging webhook payloads
Comparing before/after exports
Validating test fixtures
Checking localization files
Comparing package metadata
Spotting unexpected data changes

Common JSON Diff Examples

Changed string value

user.name: "Alice" → "Alicia"

Added key

user.plan added with value "Pro"

Removed key

settings.theme removed

Number changed to string

user.id: 123 → "123"

Nested object changed

user.profile.email changed

Array item changed by index

items[2].price changed from 10 to 12

Key order ignored

Reordered object properties are not counted as changes.

Whitespace ignored

Pretty vs minified JSON can compare as equal.

Privacy and Local Processing Notes

Pasted JSON is processed locally in your browser.

No account is required and no backend storage should be added.

JSON content is parsed as data and is never executed as code.

Avoid pasting sensitive production secrets unless necessary.

This tool is intended for lightweight comparison, debugging, and validation.

Method Explanation

  1. 1Read the original and updated JSON inputs.
  2. 2Parse both inputs safely with JSON.parse.
  3. 3Normalize formatting if requested.
  4. 4Optionally sort object keys or ignore key order.
  5. 5Walk both JSON structures recursively.
  6. 6Record added, removed, changed, and type-changed values.
  7. 7Show differences by JSON path.
  8. 8Provide a readable summary and copy-ready output.

Frequently Asked Questions

A JSON diff checker compares two JSON structures and highlights added keys, removed keys, changed values, type changes, and nested differences.