What is JSON?
JSON (JavaScript Object Notation) is a text format for structured data built from objects, arrays, strings, numbers, booleans and null. It is defined by RFC 8259 and ECMA-404, is language-independent, and is the default format of web APIs because it is compact, human-readable and easy to parse.
How to use JSON Diff
- Paste the original document on the left and the modified one on the right.
- Tick "Ignore array order" if array position does not matter for your data.
- Click Compare to see the summary, the difference table and the line view.
- Download the table when you need to attach the changes to a ticket.
“Ignore array order” offDefault
Items are compared by index: [0] with [0], [1] with [1]…
featuresrows in Differences:- 3
- Summary: Changed:
- 5
$.features[0] changed "cart" → "coupons"$.features[1] changed "coupons" → "cart"$.features[2] changed "wallet" → "gift-cards"
“Ignore array order” on
Items are matched by content, so the moved "cart" and "coupons" find their match and are not reported
featuresrows in Differences:- 1
- Summary: Changed:
- 3
$.features[2] changed "wallet" → "gift-cards"
The tool’s example (Load example): features is ["cart","coupons","wallet"] on the left and ["coupons","cart","gift-cards"] on the right. Its other differences are the same in both modes.
JSON Diff features
- Semantic comparison — key order, whitespace and formatting are ignored
- Every difference listed with JSON path, change type, old value and new value
- Optional "ignore array order" mode for set-like arrays
- Line-by-line diff view of both pretty-printed documents
- Summary counters for added, removed and changed values
- Exports the difference table as CSV
JSON Diff example
Compare two configuration versions
Input:
Left: {"version":"1.4.0","limits":{"rps":100}}
Right: {"limits":{"rps":150,"burst":200},"version":"1.5.0"}Output:
$.version changed "1.4.0" → "1.5.0"
$.limits.rps changed 100 → 150
$.limits.burst added → 200Frequently asked questions about JSON Diff
What does "semantic" comparison mean?
The two documents are parsed and compared as data, not as text. Key order, whitespace and indentation never count as differences — only actual values do.
Can I ignore the order of array items?
Enable "Ignore array order". Items are then matched by content, so ["a","b"] and ["b","a"] are considered equal.
What do the change types mean?
Added: the key exists only on the right. Removed: only on the left. Changed: both exist but the value differs. Type changed: the value switched type, e.g. from a string to an object.
How are differences reported?
Every difference is listed with its JSON path plus the old and new value, and a line-by-line view of both pretty-printed documents highlights the changes visually.
Technical notes
Both inputs are parsed and walked in parallel. Objects are compared by key, arrays by index (or by canonical content when array order is ignored), and primitives by value. The line view pretty-prints both documents with sorted keys and runs a longest-common-subsequence diff, falling back to a coarse diff for extremely large inputs.
References
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange FormatThe JSON grammar: objects, arrays, strings, numbers, the three literals, and UTF-8 as the interchange encoding.
- ECMA-404: The JSON Data Interchange SyntaxThe JSON syntax as an Ecma standard, kept in step with RFC 8259.
- Introducing JSONThe original one-page description of JSON with its railroad diagrams.