Recursively sorts JSON object keys alphabetically.
JSON Sort Keys recursively reorders the keys of a JSON object into alphabetical order, walking through nested objects and the objects inside arrays. The result is re-serialized with 2-space indentation, giving you a consistent, canonical key order. It's handy when you want to compare two JSON files, reduce noisy diffs, or normalize output whose key order is otherwise unpredictable.
No. The tool runs entirely in your browser using JavaScript, and nothing you paste is uploaded or stored anywhere. The whole site is open source and 100% client-side.
No. Array element order is preserved exactly as-is; only the keys of objects are sorted. Objects nested inside arrays do have their own keys sorted.
Sorting is recursive, so keys at every level of nesting are reordered alphabetically, including objects found inside arrays.
Keys are sorted using JavaScript's default string comparison, which orders by Unicode code points. This means uppercase letters sort before lowercase ones (for example, "Name" comes before "name").
Valid input is re-serialized as JSON with 2-space indentation. If the input isn't valid JSON, parsing fails and you'll get an error rather than sorted output.