Compare JSON Online
Compare two JSON objects, arrays, or files and instantly find the difference between them — see exactly which properties were added, removed, or changed, traced by path, not buried in a wall of text.
Original document
Document to compare against
More about comparing JSON
Features, how it works, supported file types, and frequently asked questions.
+
More about comparing JSON
Features, how it works, supported file types, and frequently asked questions.
Built for how JSON actually differs
Property-level accuracy
Every difference is traced back to the exact property path, like user.address.city, instead of flattening everything into a wall of red and green text.
Order doesn't fool it
Reordering keys inside an object isn't a change. The comparison looks at what each property holds, not where it happens to sit in the file.
Arrays and nested objects
Objects nested inside arrays, and arrays nested inside objects, are walked recursively so a change three levels deep is still reported cleanly.
Two ways to read the result
Switch between a side-by-side view for spotting structure, and a unified view for a compact, copy-friendly summary of what moved.
How the comparison works
Add both documents
Paste JSON directly, drag a file onto either panel, or click Upload file. Nothing leaves your browser at this stage.
Choose how strict to be
Decide whether key order matters and whether string comparisons should be case-sensitive, then run the comparison.
Read the result
A summary line totals additions, removals and modifications. The detailed view underneath shows exactly where each one lives.
Supported file types
JSON and plain text are compared right here. XML, YAML, and CSV are auto-detected and compared structurally over on File Compare.
Other comparison tools
json-compare.com covers more than just JSON — pick the tool that matches what you're comparing, or let File Compare figure it out for you.
Learn more about comparing JSON
What JSON comparison actually checks+
Comparing two JSON documents means answering three questions for every property: was it added, was it removed, or did its value change. Anything left over is unchanged, and a genuinely useful comparison tool should say so explicitly rather than making you infer it.
That's different from comparing JSON as plain text. Two files can be byte-for-byte different — different indentation, different key order, a trailing newline — while representing exactly the same data. A structural comparison sees through that and reports on the data itself.
Comparing nested objects and arrays+
Real-world JSON is rarely flat. Configuration files, API responses and data exports usually nest objects several levels deep, sometimes inside arrays of similar records.
A property path like orders[3].shipping.address.postalCode tells you precisely where a change happened, which is far more useful than a generic notice that 'the arrays differ.' Arrays are compared position by position, so inserting an item in the middle will show up as a change to everything after it — which is expected, since that's genuinely what happened to the array's contents.
Formatted versus minified JSON+
Minified JSON — no line breaks, no indentation — is common in API logs and network captures, but it's unreadable in a diff. Comparing two minified files as plain text usually produces one giant 'line changed' result that tells you nothing.
Parsing both documents first removes the formatting from the equation entirely. Whatever indentation, spacing or minification either file originally used, the comparison is based on the parsed data, and the result view re-prints both sides consistently so you can actually read them.
Working with large JSON documents+
Large exports and API responses can run into thousands of lines. The comparison itself only walks the parts of the structure that actually differ — matching subtrees are recognized and skipped rather than being re-checked property by property — so the summary stays fast even on sizeable documents.
For very large files, it's worth narrowing down what you're actually checking. If you only care about one section, pasting just that section on both sides will always be faster and easier to read than diffing an entire multi-thousand-line export.
Privacy: where your data actually goes+
Both panels are read and compared entirely inside your browser using JavaScript running on your own device. The content is never sent to a server, logged, or stored anywhere — closing the tab clears it completely.
That matters for JSON in particular, since it's often the format used for API responses, configuration files, and data exports that may contain internal identifiers or customer data. See the privacy page for the full explanation of what does and doesn't happen to your data.
Frequently asked questions
How do I compare two JSON files instead of pasting them?+
Drag a .json file onto either panel, or click Upload file to pick one from your device. The contents load straight into the editor and never leave your browser — there's no upload step involved.
What happens when the same properties appear in a different order?+
Nothing is reported as changed. The comparison matches properties by name, not by position, so reordering keys inside an object has no effect on the result. If you specifically want to see ordering differences, turn off the Sort keys option before comparing.
Can it compare deeply nested objects and arrays?+
Yes. The comparison walks into every nested object and array on both sides, so a change to something like settings.notifications[2].channel is reported with its full path rather than being lost inside a larger block.
Will formatting differences, like pretty-printed versus minified JSON, cause false results?+
No. Both documents are parsed first and then re-formatted consistently before anything is compared, so whitespace, indentation and line breaks in the original files never affect the outcome.
What happens if one of my files isn't valid JSON?+
The panel is marked as invalid and the parser error is shown underneath it. You can still run the comparison — it falls back to a line-by-line text comparison so you're not blocked while you fix the syntax issue.