Sort an array using one explicit key
Paste a top-level JSON array, enter JSON Pointer key, optionally enable Descending, and choose Sort array. The pointer is relative to each item. An empty pointer sorts direct scalar items such as [3,1,2].
Example: stable equal scores
The loaded example uses /score. Ascending order is Lin (1), Ada (2), Max (2). Ada stays before Max because equal keys preserve their original order. Descending gives Ada, Max, Lin; it reverses key order without reversing tied records.
Supported key types
All selected keys must be numbers, or all must be strings. Missing paths, mixed number/string keys, null, booleans, arrays and objects produce an error. The sorter does not guess whether strings contain dates or numbers. Numeric keys use numeric comparison; strings use case-sensitive UTF-16 order, without locale collation or natural-number sorting.
For example, strings "10" and "2" sort in that order, while numbers 10 and 2 sort as 2 then 10. An empty array is valid and remains empty. Strings are not trimmed, normalized or case-folded. Use JSON Array Filter first when only a subset should be retained.
Review the sorted result
The operation reorders only direct array items and does not recursively sort nested arrays. It preserves parsed item values and returns formatted JSON. Numeric precision and spelling follow the reader limits below; this is not a lossless text reordering tool. Changes to the pointer, direction or input clear the previous result and download.
Reader limits and output
Input supports 200,000 characters, 20,000 values and 64 nesting levels. Duplicate keys, unsafe integers, nonfinite numbers and nonzero values that underflow to zero are rejected. Other decimals use JavaScript floating-point precision. Formatting, escape spelling and negative zero may normalize; quote precision-sensitive data as strings. General output is capped at two million characters. Processing stays in the browser, and editing inputs or options clears stale results.
An empty array returns an empty result without resolving the pointer, since there are no items. For a nonempty array, every item must support the chosen pointer.





