Skip to main content
Calctrove Calctrove

JSON Sorter

JSON Sorter

Paste input, adjust settings if needed, then run.

More actions
Input: manual
InputsText/FileManual input • Auto-updateWaiting

File input

Choose a file

Click, drop, or paste from clipboard.

Settings

2

Status

Waiting for output.

Health 55/100

JSON Sorter policy

Designed for deterministic key order in diffs and snapshots with optional lenient normalization.

Rules: 3
Medium risk: 2
Low risk: 1
  • Recursive sorting

    LOW risk

    Object keys are sorted recursively in ascending lexical order.

  • Order sensitivity

    MEDIUM risk

    If downstream systems rely on insertion order for readability, sorted output may differ from authored key order.

  • Normalization scope

    MEDIUM risk

    Lenient mode can repair common non-JSON syntax before sorting, but does not infer missing semantic values.

Result size
Live

0chars

Run to update output.

Copy result = output only. Copy report = output + settings.

Flow
  • Parse input JSON using strict or lenient mode.
  • Sort keys recursively for every object node.
  • Output deterministic JSON for clean comparison and caching workflows.
Example

Worked example: normalize config object

  1. 1 Input: {"z":1,"a":{"y":2,"b":3}}
  2. 2 Sorter applies lexicographic order at each object level.
  3. 3 Output: {"a":{"b":3,"y":2},"z":1} (formatted).

Nested objects become deterministic and easier to diff.

How
  1. Paste JSON payload into the input panel.
  2. Choose parse mode and run recursive key sort.
  3. Copy sorted output for tests, diffs, or storage.
Cases
  • Reduce noisy git diffs caused by inconsistent key order.
  • Normalize cache keys or generated fixtures.
  • Compare JSON objects from different services fairly.
Avoid
  • Expecting array item order to change (arrays are preserved).
  • Sorting JSON before confirming key order is not business-critical.
  • Expecting lenient mode to infer missing semantic fields instead of only normalizing syntax.
FAQ
Does json sorter send my input to a server?

No. JSON Sorter handles the input in your browser whenever possible, so routine conversions, previews, and copy actions stay on your device instead of being sent to Calctrove servers.

Does JSON sorter reorder arrays?

No. It only sorts object keys; array order remains unchanged.

Why sort keys at all?

Sorted keys reduce diff noise and make generated payloads deterministic.

Switch
Switch12