JSON Array Sorter
JSON Array Sorter shows the detected type before sorting, because a numeric field stored as text is the reason most sorts come out wrong.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
JSON Tools
JSON Array Sorter
Frontend preview — no upload or external service.
Sorted Array
Your results are ready.
How the JSON Array Sorter works
- Paste the array of objects.
- Enter the key to sort by, and a second key to break ties.
- Check the type detection — numeric strings sort very differently as text than as numbers, and that is the most common surprise.
FAQ
Why did 10 sort before 2?
Because they were compared as strings, where 1 precedes 2. Numeric fields stored as strings need a numeric comparison, which is why type detection is shown rather than assumed.
How are nulls handled?
You choose. Putting them last is the usual convention for a display list; first is sometimes wanted for review queues where missing data needs attention.
Can I sort by more than one key?
Yes. The second key breaks ties in the first, which is how you sort by department then by name within each department.
How we compare
| Feature | Online Tool Store | A CLI script | An IDE plugin |
|---|---|---|---|
| Correct numeric ordering | ✓ | String sort | ✓ |
| Multi-key sort | ✓ | ✗ | ✓ |
| Nothing uploaded | ✓ | Local | ✗ |
| No install | ✓ | ✗ | ✓ |
JSON Array Sorter shows the detected type before sorting, because a numeric field stored as text is the reason most sorts come out wrong.