Skip to content
ToolHive

JSON Compare

Compare two JSON documents and see added, removed, changed and retyped values listed by path. Reordered keys and different indentation are not reported as changes, because the comparison walks the data rather than the text.

JSON Tools

How to use JSON Compare

  1. Paste one document into the left panel and the other into the right.
  2. Both are validated first; any parse error is reported before comparison.
  3. Read the summary counts, then the table of differences by path.
  4. Switch to Raw text if you want to see the change as a line diff instead.
  5. Copy the report as a plain-text list of differences.

Examples

A type change that is easy to miss

The value looks the same in a text diff, but the number became a string — a common cause of downstream bugs.

left:   "rate": 100
right:  "rate": "100"
->      $.limits.rate  number -> string

Reordered keys are not a difference

These two documents are equivalent, and structural mode reports no changes at all.

{"a":1,"b":2}   and   {"b":2,"a":1}

Features

  • Structural comparison by path, so key order and formatting are ignored
  • Four categories: added, removed, changed value and changed type
  • Every difference located with a JSONPath-style path such as $.limits.rate
  • Summary counts for each category
  • Optional raw-text diff of both documents re-serialised identically
  • Validates both sides first and explains any parse error
  • Copy the whole report with + - and ~ markers
  • Swap sides and load a worked example in one click

Frequently asked questions

How is this different from a text diff?
A text diff compares lines, so reordering keys or changing indentation shows up as changes. This walks both documents and compares values by path, so it reports only real differences in data.
Does key order matter?
Not in structural mode. JSON objects are unordered by specification, so two documents with the same keys in different orders are equivalent and reported as identical.
How are arrays compared?
By index: element 0 against element 0, and so on. An item inserted at the start therefore shifts everything after it, which is reported honestly rather than guessed at.
What counts as a type change?
When the same path holds different JSON types on each side — a number becoming a string, or a value becoming null. These are called out separately because they are a frequent source of bugs.
Is there a limit on differences?
The first 5,000 differences are collected, which is far beyond what is readable. The tool says so when the cap is reached.
Are my documents uploaded?
No. Both are parsed and compared in your browser, and stored only in this browser.

Related tools

About JSON Compare

JSON Compare is part of JSON Tools on ToolHive, a growing collection of small, focused utilities for developers, designers and students. Format, validate, minify and convert JSON with instant feedback as you type. Everything runs client-side, so your data never leaves the browser tab — which makes these tools safe to use with work-in-progress code and private content.