Skip to the tool

JSON Diff

Compare two JSON documents semantically and list every added, removed, or changed field by path—regardless of formatting or key order.

Differences

  • modified$.role"engineer""staff engineer"
  • removed$.age28
  • added$.team"platform"

Tip: paste minified or formatted JSON—whitespace does not affect the result.

JSON Diff parses both inputs and compares them as data, not as text. This means reordered keys, changed indentation, or different spacing do not show up as noise: a field that only moved position is reported as unchanged, while a genuinely changed value is shown with its full JSON path.

Each difference is classified as added, removed, or modified. Modified values show both the old and new value side by side, while additions and removals list only the side that exists. Paths use dot notation for objects and bracket notation for arrays, such as $.user.addresses[0].city.

The tool runs entirely in your browser—neither document is uploaded. Objects are compared key by key while arrays are compared element by element in order. Unlike a character-level text diff, moving a block of JSON is not mistaken for a deletion followed by an insertion.

Common uses

Frequently asked questions

Does key order matter?
No. Objects are unordered collections in JSON, so the comparison is by key regardless of where each key appears. Reordering keys produces zero differences; only actual value changes are reported.
How are arrays compared?
Arrays are compared element by element at each index. If an element is inserted in the middle, every later element shifts index and may show as a change. This is deliberate—matching elements by value would require a quadratic search that can freeze the page on large arrays.
What if one side is invalid JSON?
The diff stops and reports which document failed to parse, along with the line and column from the parser. Fix the syntax error first; the comparison resumes automatically once both inputs are valid.
Why not just use a text diff?
A text diff works on characters and lines, so reformatting or moving a block creates large red and green regions even though the data is unchanged. Semantic JSON diff treats both inputs as values and reports only meaningful changes, making reviews faster and less error-prone.
Is my data uploaded?
No. Parsing and comparison happen in your browser using JavaScript; nothing in either textarea is sent over the network. You can safely compare configuration containing secrets as long as you trust your own machine.

Related tools