Structural JSON diff

Compare two JSON structures and inspect additions, removals and changes at explicit paths, preserving number spellings without rounding.

Processing is local, with no input upload or automatic saving. Each input is limited to 256 KiB of UTF-8, 512 KiB combined; depth 32, 30,000 values per input, 2,000 differences and a 1 MiB report. Comparison stops after 5 seconds.

Object key order is ignored. Arrays are compared by index without move detection. Numbers are compared by spelling: 1, 1.0 and 1e0 differ, without rounding large numbers. JSON strings are decoded for comparison without Unicode normalization. Changing a subtree type, adding it or removing it produces one row containing the entire subtree.

Comparison inputs

How to use

Paste the before and after JSON texts, then compare. Review each change kind, path and before/after JSON text, and move through preview pages when needed. Explicitly copy the complete report or download it as json-diff.json. Editing an input invalidates the previous result; the report does not replace either input.

Try an example

Before: {"n":1,"a":[1,2]}; after: {"a":[2,1],"n":1.0}. There are three changes: /n from the text 1 to the text 1.0, /a/0 from 1 to 2, and /a/1 from 2 to 1. Reordering the two object keys alone adds no change. The key a/b~c appears at /a~1b~0c.

Support & limits

Object-key order is ignored, but arrays are compared by index; item moves and set matching are not inferred. Numbers are compared by their original lexemes: 1, 1.0 and 1e0 differ and are never converted to Number. JSON strings are decoded for comparison without Unicode normalization. Adding, removing or changing the type of a branch produces one row containing that entire branch. An empty path denotes the root; JSON Pointer escapes ~ as ~0 and / as ~1. The report fields before and after are strings containing compact JSON, not rounded numeric values. A field is omitted when that side is absent, while JSON null is represented by the string "null". The report describes differences; it is not a JSON Patch for applying changes. Processing stays in the browser without executing JSON content, uploading it, or automatically storing or copying it.

Common questions

Does an equal result mean the texts are byte-for-byte identical?

No. Whitespace outside strings, object-key order and character-escape spellings may differ while values remain equal under this policy. The changes list is then empty, and the report can still be copied or downloaded. Conversely, a different number lexeme or array-element order counts as a difference even when the meaning seems similar.

Related tools