← All Tools

Json Sort🔒 100% local

Sort JSON keys alphabetically. Privacy-first, no server uploads, no tracking.

Recursively sorts object keys into ascending order and reprints the document with two-space indentation. Every object at every depth is sorted, including objects nested inside arrays; array order itself is never touched. Key order is the only thing that changes, and the sorting runs inside the browser tab.

How to use it

  1. Paste a JSON document.
  2. Click Process to reorder the keys.
  3. Copy the reordered document from the output box.

Worked example

{"z":1,"a":{"y":2,"x":3}}becomes{ "a": { "x": 3, "y": 2 }, "z": 1 }

The nested object is sorted in place inside its parent's alphabetical slot.

When to use it

What it does not do