Skip to content
DiffCraft
  • 100% client-side isolated
  • no upload
  • JSON paths, not lines

Inspect two JSON payloads by structure

Compare two JSON payloads structurally: every added, removed or changed key is reported by its exact path, and key order is either ignored or enforced.

Inspector settings

Format both sides, then choose whether key order counts as data.

Strict key orderSemantic: order is ignored
Show
Indent
Payload A
16 lines · 252 charsPaste JSON or drop a .json file
Payload B
17 lines · 283 charsPaste JSON or drop a .json file
5 structural differences6 values match. Arrays are matched by index, so a moved item reads as one removal and one addition.
Added keys
2
Removed keys
0
Changed values
3
Reordered objects
0
Values matched
6
Mode
semantic
  1. Changed"SW1A 1AA""SW1A 2BB"
  2. Added"poetry"1 value
  3. Addedfalse1 value
  4. Changed"pro""team"
  5. Changed35

Why paths beat lines

A textual diff of two payloads reports indentation, key order and a moved brace. A structural diff answers the question a reviewer actually has: which field changed, and to what. Every entry in the report is a path you can paste into a debugger or an assertion.

Semantic or strict

Semantic mode compares values, so two objects with the same keys in a different order are identical — which is what JSON means. Strict mode also compares the exact key sequence and reports the reordering at its path, which is what a generated file or a signed payload needs.

When a payload is not JSON

Parsing stops at the first invalid character and says where: line and column, plus the engine's own message with its internal offsets stripped out. The comparison then waits, so a diff is never computed from a half-read document — a failure mode that silently hides bugs.

  • Diff Checker

    Compare two documents line by line: split panes or the unified patch order, word-level highlights inside changed lines, line numbers, whitespace and case rules, and a copy-ready unified patch with three lines of context.

    Open tool
  • Text Compare

    Clean both sides first — case, trailing spaces, blank lines, accents, smart quotes and punctuation — then read a similarity score built from Levenshtein distance and Jaccard overlap, and see exactly what still differs.

    Open tool
  • Diff Explainer

    Soon

    An illustrated walk through Myers' greedy algorithm on this same engine: how the edit graph is built, why the shortest edit script is the readable one, and when a diff has to stop early and say so. In development on the same client-side code.

    In development

JSON diff FAQ

Semantic mode, array matching, numbers and invalid payloads.

What is the difference between semantic and strict mode?

Semantic mode (the default) compares values: two objects with the same keys in a different order are identical. Strict mode also compares the exact key sequence and reports a reordered object at the path where the order changed. For a generated file or a signed payload, strict is the honest reading.

How are arrays compared?

By index: element 0 against element 0, and so on. Extra elements are reported as additions at their index and missing ones as removals. That rule is shown in the UI because it means reordering an array reads as several changes — it is the only rule that needs no extra assumption about identity.

What happens when a payload is not valid JSON?

The inspector reports the line and column where parsing stopped, plus the engine's own message with its internal offsets removed. The structural comparison waits until both sides parse, so a diff is never built on a partially read document.

Are 1 and 1.0 different numbers?

Under JSON they are the same number, and both parse to the same value, so they compare as equal. A number against a string (1 against "1") is reported as a type change, which is the difference that actually breaks a consumer.