Sort JSON objects installs statistics
By richie5um2 · VS Code Marketplace · Other
Sorts the keys within JSON objects
Sort JSON objects has 744,751 recorded installs on VS Code Marketplace, ranking #661 of 2,501 tracked listings.
Rating: 4.68 / 5 from 50 ratings
About Sort JSON objects
VSCode SortJSON
What is it?
Alphabetically sorts the keys in selected JSON objects.
Please take care using this - I've tried to ensure it won't invalidate your JSON. But, as it has to parse > sort > stringify, there is a chance it'll lose something. It should be fine for plain JSON.
<a target="_blank" href="https://www.buymeacoffee.com/richie5um"><img src="https://github.com/richie5um/vscode-sort-json/raw/HEAD/resources/buymeacoffee.png" alt="Buy me a coffee"></a>
Install
- Install via VSCode extensions install
Usage
- Select a JSON object (note, it uses full lines so ensure the selected lines are a valid JSON object)
- Run the extension (Cmd+Shift+P => Sort JSON)
Context Menu
If there are too many entries in the Context Menu, then you can modify which get shown by adding (and editing) this to your VSCode preferences:
"sortJSON.contextMenu": {
"sortJSON": false,
"sortJSONAlphaNum": false,
"sortJSONAlphaNumReverse": false,
"sortJSONKeyLength": false,
"sortJSONKeyLengthReverse": false,
"sortJSONReverse": false,
"sortJSONType": false,
"sortJSONTypeReverse": false,
"sortJSONValues": false,
"sortJSONValuesReverse": false
}
Updates
- 1.20.0: Finally!, support for JSON with comments (JSONC) content #4..
- 1.19.2: Fixed sort files error #45.
- 1.19.1: Enable 'Formatter' - so can do format on save :) (thanks JerryGreen). Excluded Paths (thanks Sri352).
- 1.18.0: Make it more a formatter, than separate command.
- 1.17.0: Sort by type (experimental code).
- 1.16.0: Sort by values (experimental code).
- 1.15.0: Change algorithm to better cope with JSON quirks.
- 1.14.0: Sortable alphanumerically (a2 < a10).
- 1.13.0: Sortable by key length.
- 1.12.0: Improvements to JSONC comment detection (thanks reporter123).
- 1.11.0: Tries to use normal JSON outputter for some known JSON issues.
- 1.10.1: Removes (simple) comment lines from JSON before sorting.
- 1.9.2: Now sorts the whole file if there is no selected text.
- 1.9.0: Now sorts selected JSON text, even if that is embedded in a JSON object - note, doesn't preserve indents.
- 1.8.0: Sorts objects within arrays.
Example

Settings
- You can override the sort order (note: this applies to all levels and overrides reverse sort too). Add this to your preferences (settings.json):
"sortJSON.orderOverride": ["name", "version", "description"]
- You can underride the sort order (note: this applies to all levels and underrides reverse sort too). Add this to your preferences (settings.json):
"sortJSON.orderUnderride": ["dependencies", "devDependencies"]
Sort on save
There's a vscode setting for formatters (settings.json):
"editor.codeActionsOnSave": {
"source.fixAll": true
}
But you can also selectively enable/disable this formatter with (settings.json):
{
"editor.codeActionsOnSave": {
"source.fixAll.sortJSON": true
}
}
Or use a hotkey, if you prefer (keybindings.json):
{
"key": "cmd+shift+a",
"command": "editor.action.codeAction",
"args": {
"kind": "source.fixAll.sortJSON"
}
}
Description from the VS Code Marketplace listing.
- json
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Ratings over time
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Installs on a linear scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (5)Similar VS Code Marketplace Other plugins
All 20 Sort JSON objects alternativesData source
Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.
Listing: https://marketplace.visualstudio.com/items?itemName=richie5um2.vscode-sort-json. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.