JSON compare
To compare JSON, paste the two documents into A and B: the tool shows every difference with its path, old and new value – added, removed, changed or changed in type. Formatting and key order do not matter.
Source: IETF – RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format (§ 4: objects are unordered). Updated: .
How it is calculated
Comparing JSON means setting two documents side by side by their content, not their text. Two JSON files can be formatted differently and still say the same thing. The tool compares the content in your browser and names every difference with its path in JSONPath style, for example $.address.city.
How it works
- Paste the old JSON into field A and the new one into field B.
- Optionally compare arrays regardless of order or treat null and a missing field as equal.
- The table shows every difference with path, kind and both values.
How the comparison works
- Objects: keys are compared by name, their order does not matter (JSON objects are unordered according to RFC 8259).
- Arrays: position by position by default; on request regardless of order, in which case equal elements are matched up.
- Values: 1 and 1.0 are the same number; a change from number to text is reported as a type change.
- Paths: $.a.b[0] means the first element of b in a; keys with special characters appear in square brackets.
Limits
The result shows differences in content. To compare the text as well (formatting, order), use “Compare texts”.
- Up to 1 million characters per document; the table shows at most 500 differences.
- Large numbers over 15 digits are read as floating-point numbers, as in JavaScript, and can be rounded in the process.
Privacy
The documents never leave your browser. Next steps: format JSON, compare texts or YAML to JSON.
Frequently asked questions
How can I compare two JSON files?
Paste both JSON documents into fields A and B. The tool lists every difference with path, old and new value.
Does the order of keys matter?
No. JSON objects are unordered; “a” before “b” is the same as “b” before “a”.
How do I compare arrays whose order does not matter?
Tick “Compare arrays regardless of element order”. Equal elements are then matched up and only real differences appear.
What does the path in the table mean?
It shows where the difference is: $.address.city is the field “city” in the object “address”, $.tags[2] the third element of the list “tags”.
Is my JSON uploaded?
No. The comparison runs entirely in your browser.
Sources and legal basis
- IETF – RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format (§ 4: objects are unordered)
- Goessner – JSONPath: XPath for JSON (Pfadschreibweise $.a.b[0])
- IETF – RFC 9535: JSONPath: Query Expressions for JSON
As of: · Editorial policy
Related tools
- JSON formatter, validator and minifierValidate JSON against RFC 8259 with the exact line, column and a plain-English explanation. Beautify or minify, sort keys, copy. Runs locally in your browser.
- Text Compare: Find Differences Between Two TextsText compare online: see differences side by side or inline, by line, word or character. Jump between changes, save a patch. Private, in your browser.
- YAML to JSON converter (and JSON to YAML)YAML to JSON converter and JSON to YAML following YAML 1.2: lists, anchors, text blocks, comments. Errors show the line number. Runs in your browser, no upload.
- CSV to JSON converter (and JSON to CSV)Convert CSV to JSON or JSON to CSV online: delimiter auto-detected, numbers and booleans typed, quoted fields handled. Runs in your browser, nothing uploaded.
- JSON to TypeScript converterConvert JSON to TypeScript: generate types, interfaces or JSON Schema from sample data, with optional fields. Runs in your browser, no upload.
- XML formatterXML formatter: beautify, minify and validate with line and column of the error, tree view, XPath query and XML to JSON. In your browser, no upload.
- What is my IP address?What is my IP? See your public IPv4 or IPv6 address at once, plus approximate location, internet provider and browser details. Free, never stored.
- Markdown table generatorMarkdown table generator: paste data from Excel, Google Sheets or CSV and copy it as an aligned Markdown, HTML or LaTeX table – locally in your browser.
- Screen size calculatorScreen size calculator: width and height in cm and inches from the diagonal and aspect ratio, plus pixel density (ppi), pixel size and the distance pixels blur.