JSON Key Sorter

JSON Key Sorter

Local Processing

Sort keys in nested objects while retaining array item order.

How It Works & Processing Standards

Sort keys in nested objects while retaining array item order.

Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.

Current Limits

  • Desktop max file size: 50MB
  • Mobile max file size: 20MB

For comparing two JSON documents or keeping config files tidy. Keys are sorted at every depth; items inside arrays keep their order.

What You Can Do

Nested sorting
Inner object keys are sorted too.
Arrays untouched
Array order is meaningful, so it is kept.

How to Use JSON Key Sorter

  1. 1
    Paste JSONPaste the JSON to sort.
  2. 2
    CopyCopy the sorted JSON.

Examples

Sort nested objects
Input: {"b":1,"a":{"d":2,"c":3}}
Result: { "a": { "c": 3, "d": 2 }, "b": 1 }

Common Use Cases

  • Aligning order before comparing two JSON files
  • Cleaner diffs of config changes

Frequently Asked Questions (FAQ)

How are upper- and lower-case ordered?

By character code, so upper case (A–Z) comes before lower case (a–z).

Have feedback or ideas for this tool? Suggest & Inquire →