Skip to main content
OnlineTools

Runs locally in your browser

JSON Diff

Compare two JSON documents structurally. Find added, removed, and changed values by path without differences caused by whitespace or property order.

+ 2 added− 1 removed~ 1 changed
changed$.version
Before: 1
After: 2
added$.features[2]
After: "compare"
removed$.private
Before: true
added$.local
After: true

✓ Compared structurally in your browser

Compare JSON by structure, not formatting

JSON Diff parses both documents before comparing them. Indentation, spaces, and object property order are ignored, so the result focuses on actual values, missing keys, new keys, and array items. Types remain significant: the string "1", number 1, boolean true, and null value are different.

Read added, removed, and changed paths

$.version

Changed from 1 to 2 because the same object property exists on both sides with a different value.

$.local

Added because the property exists only in the changed document.

$.private

Removed because the property exists only in the original document.

$.features[2]

Added at array index 2. Arrays are positional, so inserting near the beginning can cause later indexes to appear changed.

When to use JSON Diff instead of Text Diff

Use JSON Diff for API responses, configuration files, fixtures, and generated data when whitespace and key order should not matter. Use Text Diff when formatting, comments, line order, or non-JSON content is itself meaningful.

Frequently asked questions

How is JSON Diff different from Text Diff?

JSON Diff parses both documents and compares object keys and array indexes. Formatting and property order do not create changes, while Text Diff compares literal lines.

How are arrays compared?

Array items are compared by their numeric index. Inserting an item near the beginning can therefore produce several subsequent changes.

What does the $ symbol mean in a path?

$ represents the root JSON value. Object fields use dot or bracket notation and array items use numeric brackets, such as $.users[0].name.

Is either JSON document uploaded?

No. Parsing and structural comparison happen locally in your browser.

Related tools