Skip to content
littlekit.app
All tools

Sort JSON keys

Sort nested JSON object keys alphabetically with a live preview while keeping array order intact.

Source
Sorted key order
applebananamangozebra
Sorted JSON preview
{
  "apple": {
    "color": "green",
    "size": "small"
  },
  "banana": 2,
  "mango": 3,
  "zebra": 1
}
Processed on your device

How it works & useful details

How it works

Sort every object’s keys using case-sensitive UTF-16 lexical order. Numeric-looking keys are sorted as text, so “10” comes before “2”. Array elements retain their order. This is a key sorter, not a canonicalization or signing implementation.

Limits & privacy

Up to 1,000,000 characters, 50,000 values and 64 levels. Live previews pause above 40,000 characters; run the tool to process the full supported input. Imported files must be UTF-8 and under 1 MB. Your data stays on this device.

Numbers use JavaScript decimal precision. Unsupported large integers are rejected; quote identifiers to keep all digits. Duplicate object names keep their last value. Transforms preserve data, not source whitespace or number spelling.

Paths use JSON Pointer: an empty path selects the root, ~0 escapes a tilde, and ~1 escapes a slash.