JSON Key Sorter
Sort the keys of a JSON document A to Z, in reverse, naturally or in your own order, at every level. Private, in your browser.
More options
JSON
Stays in your browserSorted JSON
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to JSON Beautifier or JSON Compare.
Free Online JSON Key Sorter
Paste JSON and get every object with its keys in order. Useful for clean diffs, config files and comparing two documents. It gives developers a quick browser-based way to solve a focused json key sorter task before moving the result into a project.
How to use JSON Key Sorter
Paste your code in the box on the left, or open a file, then press Sort. Choose the order. Put keys such as id and name first with "Keys to put first". Arrays stay as they are unless you ask to sort them.
Common mistakes
- Sorting arrays when their order matters, such as steps or rankings.
- Expecting comments to survive: JSON has none, and this tool reads strict JSON.