JSON key sorter

Sort object keys recursively while preserving array order.

Text Stateless

Maximum input length per field: 65536 Unicode code points. See the operation limits in the instructions.

Quick guide

Try it with your own data when you’re ready.

Try an example

You enter

JSON document
{"b":2,"a":1}
Operation
Compact JSON

You get

{"a":1,"b":2}
How it works & limits

Keys are sorted by Unicode code-point order at every object level. Arrays retain their order and numeric tokens retain their exact digits and exponents.

Choose indentation or compact output. Duplicate keys and nesting beyond 32 levels are rejected.

This is key sorting, not cryptographic JSON canonicalization.