Vai al contenuto principale
CuteJSON
↑↓ Naviga Enter Seleziona Esc Chiudi

JSON Key Sorter

Put the keys of every object in order so two versions of the same document can be read side by side.

Torna a tutti gli strumenti

Scorciatoie da tastiera

Funzionano dove l'azione corrispondente esiste in questa pagina.

Apri la tavolozza comandi
Ctrl/Cmd + K
Esegui l'azione principale
Ctrl/Cmd + Enter
Formatta
Ctrl/Cmd + Shift + F
Minifica
Ctrl/Cmd + Shift + M
Copia output
Ctrl/Cmd + Shift + C
Apri file
Ctrl/Cmd + Shift + O
Scarica output
Ctrl/Cmd + S
Chiudi questa finestra
Esc
Apri questa finestra
F1 / ?

Dati locali

Tutto qui sotto e memorizzato solo in questo browser.

Bozze non salvate
Strumenti con opzioni ricordate

File aperti di recente

    Nessun file aperto ancora.

    Condividi via link

    Il contenuto e impacchettato nella parte dopo il #.

    Condivide la prima input in questa pagina.

    Niente da condividere ancora.

    Input

    Carica da un URL

    Recupera l'URL dal tuo browser.

    Output

    Il risultato appare qui.

    Funziona interamente nel tuo browser.

    Su questo strumento

    Sorting keys is what makes two versions of a document comparable. Configuration written by hand and configuration written by a program hold the same data in a different order, and a text diff on the pair is unreadable until both sides are sorted the same way. Only object keys move here. An array is left exactly as it was, because the order of an array is part of the data, and a tool that quietly sorted arrays as well would change what a document means while claiming to tidy it. Comparison is by code unit by default, which puts capitals before lower case and 10 before 2. The option to read digit runs as numbers fixes the second of those, and is written out here rather than handed to the browser, since a comparison that follows the page language would sort the same file differently in each of this site four languages. Duplicate keys survive as duplicates, side by side.

    Come usare

    1. Paste your JSON into the input pane, or load the sample.
    2. Choose the order and the indent width, then press Sort keys.
    3. Copy the result or download it as a file.