JSON Sorter

Normalize JSON key order for cleaner diffs, code reviews, and deterministic fixtures without uploading data.

Local processingYour input stays in this browser tab.

Input

Paste JSON to sort object keys

0 charactersArrays keep original order

Sorted output

JSON with recursively sorted object keys

Sorted JSON appears here.

Waiting for valid JSON

How to sort JSON keys

Paste a valid JSON object or array, choose ascending or descending order, then sort. Object keys are sorted recursively; array item order is intentionally preserved because arrays are ordered data.

Why sort JSON

Sorting is useful when comparing generated configs, snapshots, and API examples where key order changes make reviews noisy. Use the JSON Compare tool after sorting for cleaner diffs.