JSON Sort — Sort Keys & Arrays Free
JSON sort online — alphabetize keys deeply or sort arrays of primitives/objects in one click. Case-insensitive, asc/desc, browser-based, no signup.
Sort any JSON document deterministically — recursive key sort, optional array-element sort (primitives or by object key path), case-insensitive, asc / desc. Useful for canonicalizing JSON before diffs, hashes, or commits, and for cleaning up exported configs.
Need to compare two JSON values? JSON Diff. Format only? JSON Formatter (also has a sort-keys mode).
How to Sort JSON Keys and Arrays
Paste your JSON
Could be a config, a fixture, an export — any JSON document where you want predictable ordering.
Pick what to sort
Sort keys (deep, recursive), sort arrays of primitives, or sort arrays of objects by a key path. Optional case-insensitive and asc/desc.
Click Sort JSON
PDFFlare returns a deterministically-ordered version of the JSON. Use it as a stable canonical form for diffs, hashes, or commits.
When Do You Need to Sort JSON?
Reproducible hashes: Caching by JSON-content-hash requires a canonical form. Sort first, then hash — identical values produce identical keys.
Cleaner diffs: Two JSON files with the same data but different key orders show up as full-file changes in git diff. Sort both first; only the real changes show up.
Snapshot tests: Jest, Vitest, and Insta-style snapshot tests get noisy when JSON serialization order is non-deterministic. Sort before snapshotting for stable tests.
Reviewing config files: Sorted keys are easier to scan in a 100-key config. Especially for new contributors: alphabetical order means they don't have to know the project's convention.
Why Use PDFFlare for JSON Sort?
Deep + Configurable
Recursive key sort, optional array sort, asc/desc, case-insensitive — turn on what you need without rewriting a snippet.
Object-Array Sort
Sort an array of objects by any key path — id, createdAt, name — without writing a comparator.
100% Browser-Based
Your JSON stays on your device — safe for production payloads.
No Signup Required
No account, no rate limits.