Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON Key Sorter

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

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Input

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Output

    The result appears here.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    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.

    How to use

    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.

    Keep reading

    How to sort JSON keys for a clean diff Read the guide