Structural comparison with array-move detection
$.items[0] 2→0 instead of rewriting the whole array as deletes and adds. Key order and whitespace never count as changes, and everything runs in your browser.| Operation | Meaning | Example Path |
|---|---|---|
| added | Key or array item exists only in the changed document | $.coupon |
| removed | Key or array item exists only in the original | $.items[1] |
| modified | Same location, different value (or different type) | $.total |
| moved | Deep-equal array item whose index changed | $.items[0] 2→0 |
Root is $, object keys walk as .key, arrays index as [n], and keys with special characters use bracket form: $["weird key!"] | ||
| Change | Text diff shows | JSON diff shows |
|---|---|---|
| Reordered object keys | Every affected line changed | Nothing (order is irrelevant in JSON) |
| Reformatted / re-indented | Whole file changed | Nothing |
| Array reordered | Delete-add pairs across the array | Moves with from→to indexes |
| One field changed | One changed line, plus context | One modified entry with old and new value |
| Key renamed | Two line changes | One removal + one addition (no way to know intent) |
For prose, code, and CSVs, a line diff is still the right tool, and our diff checker handles those. The JSON diff earns its keep the moment structure, not text, is what changed.
This tool follows the structural approach popularized by the classic MIT-licensed JSON diff libraries (jsondiffpatch, json-diff): parse both documents, then recurse. Objects compare key by key, and every leaf comparison that fails becomes one modification entry. Nothing is guessed: two objects that merely look similar are never reported as a single "edit."
For objects, keys present in only one side become additions or removals; shared keys recurse. For arrays, items are paired by deep equality, duplicates pair in document order. Paired items whose index changed are reported as moves; unpaired originals are removals and unpaired newcomers are additions. The output is a flat list of operations with full paths from the root, which is exactly the shape you want for review or for driving a patch.
Paste your two documents and press Compare. Invalid JSON surfaces the parser error with its position instead of a garbage diff. Toggle ignore-array-order when the sequence of a list shouldn't count, common with sets of tags or IDs. Copy report produces a plain-text summary you can paste into a pull request or ticket.
The Load sample button fills both panes with an order record before and after an edit. Comparing them produces seven changes: $.customer.email modified from [email protected] to [email protected], $.total modified from 42 to 50, item A1 moved from index 0 to 1, item C3 moved from index 2 to 0, item B2 removed, item D4 added, and a new $.coupon key set to "SAVE5". A line diff on the same pair shows the entire items array rewritten, which is technically true and completely useless for review.
Worth knowing: 1.0 and 1 compare equal because JSON doesn't distinguish them after parsing, and two arrays with the same items in a different order are genuinely different JSON, which is why move detection exists rather than silent tolerance.
Paste the first document into the left box and the second into the right, then hit Compare. The tool parses both, walks the structure, and lists every difference as a path with its old and new value. Invalid JSON is reported with the parser's error position so you can fix it before diffing.
A text diff compares characters, so reformatting, reordering keys, or changing indentation shows up as noise across every line. A structural diff parses both documents first: key order is ignored, whitespace never matters, and array items that merely moved position are reported as single moves instead of delete-add pairs spanning the whole array.
The tool pairs array items by deep equality, matching each item in the original to an identical item in the changed document, with duplicates paired in document order. Paired items whose index changed are reported as moves with both positions. If you'd rather treat reordering as irrelevant, the ignore-array-order option suppresses move reports entirely.
Because pairing happens by exact deep equality. An item whose contents changed is no longer identical to anything in the other array, so it can't be paired; the old version is reported removed at its index and the new version added at its index. This is the same trade-off the classic MIT-licensed diff libraries make: unambiguous correctness at the cost of not guessing that two similar objects are 'the same' item.
No. Parsing, diffing, and rendering all run in your browser with plain JavaScript, and there's no backend call involved. That makes the tool safe for API responses, config files, and anything else you wouldn't paste into a random web form.
They're the JSON-path style addresses of each change: $ is the document root, .key walks into an object property, and [n] indexes into an array. $.customer.email points at one field; $.items[1] at the second element of the items array. Paths let you turn a diff into a patch list you can apply or review by hand.