Canonical JSON builder
Create compact JSON with deterministic key order. Duplicate keys, invalid Unicode and nonfinite numbers are rejected.
The example value has been entered. Check it immediately or change the value.
Input is processed in the browser. Refreshing returns a sample value.
Instructions and example
Sort object keys by UTF-16 code units and serialize values using ECMAScript number and string rules.
{"b":2,"a":{"z":0,"x":1}} becomes {"a":{"x":1,"z":0},"b":2}.
Input limit 20,000 characters. Numbers use 64-bit rounding, so large integer tokens are not preserved. Signing, hashing and signature validation are separate.
Frequently asked questions
Does canonical JSON sort array elements?
No. Array order is data and remains unchanged.
Does canonical JSON preserve large integers exactly?
Numeric values can round. Enter exact identifiers as strings where your schema permits.
Calculation criteria and reference materials
- RFC 8785 — JSON Canonicalization Scheme
Sort object keys by UTF-16 code units and serialize values using ECMAScript number and string rules.
Verification of calculation criteria: · Calculation·verification principles · Report errors