JSON Diff
Compare two JSON documents structurally rather than as text, so key order and formatting differences do not create false positives.
Last reviewed by the Radiatus Cloud team
JSON Diff
Compare two JSON objects and find differences.
Need this built for your product?
We design, build & host secure software & APIs.
Structural comparison, not text comparison
Running a text diff on two JSON files reports every reformatting as a change. Object key order carries no meaning in JSON, so two documents with identical data but different key order are equal, and a line-based diff will insist they are not. A structural diff parses both sides and compares the resulting values, which is the only comparison that answers the question you actually asked.
Arrays are ordered, objects are not
This is the distinction that governs everything. Object keys can appear in any order and the documents are still identical. Array elements cannot: moving an element changes the document. So a diff must treat reordering inside an object as no change and reordering inside an array as a real one, which is why comparing arrays of objects is the hardest case and where tools disagree.
Types matter as much as values
The string "1" and the number 1 are different values, and a diff should say so. This catches a genuine and common class of API bug, where a field silently changes type between versions and everything downstream keeps working until something tries arithmetic on it. Similarly, null, an empty string and a missing key are three different states that get conflated constantly.
Numeric precision
JSON numbers parse as doubles, so two documents can differ in a large integer that both display identically. Any value beyond 2^53-1 is at risk. If your payloads carry 64-bit identifiers, compare them as strings or the diff will report equality where the raw bytes differ.
Compared locally
Both documents are parsed in your browser and nothing is transmitted. API payloads routinely contain tokens and personal data, so sending two of them to a remote service to find a difference is an unnecessary disclosure.
Related tools
- JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
- JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
- Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
- HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.
Frequently Asked Questions
Why does a text diff report changes when the data is identical?
Because object key order carries no meaning in JSON, so reformatting or reordering keys changes the text without changing the data. A structural diff parses both sides and compares values.
Are arrays compared differently from objects?
Yes, and it is the central distinction. Object keys can be in any order and still be equal; array order is part of the data, so a moved element is a real change.
Does the diff distinguish types?
It should. The string "1" and the number 1 are different values, and a silent type change between API versions is a genuine bug class. So are null, empty string and a missing key, which get conflated often.
Can large numbers compare wrongly?
Yes. JSON numbers parse as doubles, exact only to 2^53-1, so two different 64-bit identifiers can appear equal. Compare large IDs as strings.
Is my data uploaded?
No. Both documents are parsed in your browser. API payloads frequently contain credentials and personal data, so keeping the comparison local matters.
Privacy & Security
Local processing.
About This Tool
This tool runs entirely in your browser. No data is sent to any server, ensuring complete privacy. Simply use the interface above to get started — no registration or login required.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
JSON Formatter
DeveloperFormat and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
JSON Validator
DeveloperValidate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
Regex Tester
DeveloperTest regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.