Compare two JSON documents
Paste or load two JSON documents and press Compare. The result lists every difference with its path, its type and the values on both sides. Both documents are checked first; if one is not valid JSON you see the line, the column and the reason instead.
What counts as a difference
- Objects: members are matched by name, so key order does not matter. A member that exists only on one side is reported as added or removed once, at its own path.
- Arrays are compared item by item, by index.
- Numbers are compared by exact value without floating-point rounding:
1,1.0and1e0are equal, while12345678901234567890and12345678901234567891are different. - Strings are compared after decoding escapes, so
"\u00e9"equals"é". Unicode is not normalized. - A value whose type changes (for example a number that becomes a string) is reported once as type changed.
- Values that are equal but written differently are not differences; they are counted separately.
Duplicate keys
JSON parsers disagree about objects that repeat a key, so the comparison never silently keeps the first or the last value. Duplicate keys are listed with the line and column of every occurrence; if the occurrences differ between the documents, the member is reported as ambiguous.
Size
Supported up to 10 MB per document. Large comparisons may take a few seconds.
Paths
Paths use JSONPath notation: $.user.name, $.items[3], and bracket form for names
with spaces, dots or quotes, such as $['first name'].
How privacy works here
Everything runs in your browser. There is no account, no history and no save or share link, and the page's
Content Security Policy (connect-src 'none') blocks it from making network requests. Like any
website, the host receives standard request information when the page itself is loaded - never the JSON you
compare. See the privacy notice.
FAQ
Does key order matter?
No. Objects are compared by member name; arrays keep their order.
Why are several array items reported after one insertion?
Arrays are compared by index, so an inserted item shifts every later item by one position.
Are 1 and 1.0 equal?
Yes. Numbers are compared by exact value; the different spelling is only counted as information.
How large can the documents be?
Supported up to 10 MB per document. Large comparisons may take a few seconds.
Can I format a JSON document here?
This page only compares. To pretty-print, minify or validate a single document, use the JSON Formatter.