Account

What new tool do you want?

Developer Tools

JSON Diff (Compare JSON)

Compare two JSON documents semantically — see added, removed and changed values by path, ignoring key order and formatting.

How to use

  1. 1Paste the original JSON on the left and the new JSON on the right.
  2. 2Each difference is listed with its path: + added, − removed, ~ changed.

Frequently asked questions

Does key order matter?

No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are identical.

Does array order matter?

Yes. Arrays are compared position by position, because order is meaningful in JSON arrays.

Are 1 and 1.0 the same?

Yes. JSON numbers are compared by value, so 1 and 1.0 are equal, but 1 and "1" are different types.

Worked example: JSON Diff

Compare {"a":1,"b":{"c":[1,2]},"d":true} against {"b":{"c":[1,3]},"a":1.0,"e":null} and the tool reports exactly three differences: ~ $.b.c[1]: 2 → 3 (a changed array element), - $.d: true (a key removed), and + $.e: null (a key added) — while a and b.c[0] are correctly treated as unchanged even though the second document reordered its top-level keys and wrote 1 as 1.0. That last detail is the point: a naive text or line-by-line diff would flag the entire document as different just from the reordering, while this comparison walks the actual structure and only reports values that genuinely changed.

Why array order matters but object key order doesn't

Objects in JSON are unordered maps, so {"a":1,"b":2} and {"b":2,"a":1} are the same data under any JSON-aware comparison — this tool matches object keys by name, not position, so reordering never produces a false diff. Arrays are different: [1,2,3] and [3,2,1] are genuinely different sequences, so array elements are compared position by position, meaning an element inserted at the front of an array will show every later element as "changed" even though they're really just shifted — a known limitation of position-based array diffing that any JSON diff tool shares, not something specific to a bug here.

When a text diff would mislead you

Pretty-printing two API responses with different indentation, key order, or trailing whitespace and running them through a plain text diff (or git diff) produces a wall of noise even when the underlying data barely changed. Because this tool parses both sides into actual JSON values before comparing, formatting differences are invisible to it by design — you only see diffs that represent a real change in the data, which is the distinction that matters when you're trying to confirm an API response or config file actually changed versus just got reformatted.

Type changes are always reported as '~', even when the text looks similar

Comparing {"a":1} against {"a":"1"} reports ~ $.a: 1 → "1" — a changed value — rather than treating a number and a numeric string as close enough, because the type check runs before the value check and a number is never the same type as a string as far as the diff is concerned. This matters most right after an API migration that changed a field's JSON type (an ID that used to be numeric and is now returned as a string, for instance): every occurrence of that field will show up as changed even though 'the data' looks unchanged at a glance, which is exactly the kind of silent breaking change this comparison is built to surface.

Inserting an array element shifts every index after it

Because array elements are diffed by position (index 0 against index 0, index 1 against index 1, and so on), comparing {"a":[1,2]} against {"a":[0,1,2]} — where a new 0 was inserted at the front — reports three differences, not one: ~ $.a[0]: 1 → 0, ~ $.a[1]: 2 → 1, and + $.a[2]: 2, even though conceptually only one value was inserted and the rest just moved over. This is an inherent property of position-based array comparison rather than a flaw specific to this tool — if you're diffing arrays that commonly have items inserted or reordered in the middle, expect a shifted insertion to read as a cascade of 'changed' entries rather than one clean 'added' entry.

Related tools

More: Developer Tools