JSON Sorter

Recursively sort JSON object keys ascending or descending while preserving array order.

Everything is processed locally in your browser and never uploaded.
Custom sortDrag top-level fields or use the arrows to set their order; unlisted keys follow alphabetically.
    Input
    Output

    How to use

    1. Step 1: Enter JSON

      Paste JSON on the left; syntax is validated as you type.

    2. Step 2: Choose a direction

      Click Sort ascending or Sort descending to reorder every object key by name. Array order is preserved.

    3. Step 3: Copy or download

      Copy the result on the right or download it as a .json file.

    Sorting only changes object key order, not values. Numeric keys are also emitted in the chosen direction.