JSON structural comparison
Compare JSON values structurally and locate changes with JSON Pointer paths, without losing large integer precision.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Paste or import an original and a comparison JSON document. Review added, removed and changed values by JSON Pointer, then copy or download the complete two-field report.
How to use this tool
- Paste both complete JSON values or import a UTF-8 file into each named role. Importing one role preserves the other role.
- Compare. Correct reported errors in the named source and run again; syntax parsing takes place in the Worker.
- Inspect the bounded table and counts. Copy or download the complete JSON report to retain all changes.
Supported inputs and limits
Each role accepts paste or one UTF-8 file import up to 1 MiB; both exact-size inputs may be used together. Filenames are limited to 512 UTF-8 bytes. Import replaces only that editable role text.
Each document allows 200,000 values at value depth 128, with the root at zero. The complete report is limited to 20 MiB.
Object key order is ignored. Arrays compare at matching indexes; insertions and moves may yield several changes. Exact decimal values compare equal: 1, 1.0 and 1e0 are equal, as are -0 and 0.
Duplicate decoded keys, comments, trailing commas and non-scalar Unicode are refused. One leading BOM may be ignored for parsing; original BOM and CR/LF remain part of effective source identity until edited.
Preview shows up to 200 rows, 512 Unicode characters per path and 160 per value. Copy and download retain every full path and compact value, including raw numeric tokens.
A new or removed subtree is one complete change. The report contains only equal and changes; provenance is shown separately. Browser processing has a 10-second Worker deadline and gives no partial new result on failure.
Worked example
Example input
{"user":{"id":9007199254740993,"active":false}}
Comparison JSON:
{"user":{"id":9007199254740993,"active":true}}Example options
{}Example output
{
"equal": false,
"changes": [
{
"path": "/user/active",
"kind": "changed",
"before": "false",
"after": "true"
}
]
}When something does not work
Correct syntax, duplicate keys or Unicode in the named source. Reduce that role input or the report expansion when a budget is exceeded. Cancel or timeout terminates the Worker; retry uses a fresh Worker and preserves both editable source texts.
Frequently asked questions
Does changing object key order count as a difference?
No. Object key order is ignored. Array order matters and changes are reported by index.
What should the example produce?
Only /user/active should change. The identifier must remain 9007199254740993 in both inputs.
Which cases are outside its scope?
Arrays compare by index, without sequence alignment or set matching. A new or removed nested container is reported as one complete subtree. The report describes changes and does not apply a patch or merge.
What do before and after contain?
They are strings containing a complete compact JSON value from the corresponding source. Their inner number tokens keep source spelling. Numbers compare by exact decimal value, so spelling alone can produce an equal result.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
Compare text
See what changed, side by side.
HTML formatter
Format HTML indentation so its structure is easier to read.