Maximum local file size: 1,000,000 bytes. The file never leaves your device.
Compare API responses

JSON Structure Diff

Compare two JSON documents by keys, array positions, and value types. The report shows added, removed, and changed paths, including nested fields. Key order does not affect the result; array order does.

Runs locally in your browser. Maximum 1,000,000 characters per input. Reports up to 200 changes; very large/deep structures may be truncated. This is a structural diff, not JSON Schema validation or RFC 6902 patch generation.


        
Verified behavior

What this JSON tool actually validates

This page uses the browser's native JSON.parse() and JSON.stringify(). “Validate” here means JSON syntax validation; it does not validate JSON Schema or an application's required fields. Sorting recursively reorders object keys but preserves array order.

Seven committed parser cases

CaseObserved result
Valid objectParsed
Trailing commaRejected
Unicode textParsed
Leading BOMRejected in the recorded runtime
Invalid escapeRejected
9007199254740993Parsed; numeric precision still needs application review
100 nested arraysParsed

The complete error strings, runtime version, and raw cases are published in Z Tools Lab.

Implementation boundaries

  • Local processing: formatting, minifying, sorting, escaping, and file reading happen in browser JavaScript. There is no server JSON-processing endpoint.
  • Input limits: pasted input is capped at 1,000,000 characters; the local file picker rejects files over 1,000,000 bytes. The separate structure diff also caps each pasted input at 1,000,000 characters.
  • Error location: when the browser exposes a numeric parser position, the tool derives a best-effort line and column from the original text. Parser wording can differ by engine.
  • Schema boundary: syntactically valid JSON can still contain the wrong fields, unsafe numeric values, or data your application should reject.

For the exact grammar, see RFC 8259. For a deeper look at the edge cases above, read JSON Validation in Practice.