Developer Tools

JSON Sort Keys with Worked Examples

Sort the keys of a JSON object alphabetically, including nested objects, for clean diffs. Enter json and read the result straight away. Example: “{"name":"InovoTools","id":42,"active":true,"address":{"zip":"10001","city":"New York"}}” gives “{ / "active": true, / "address": { / "city": "New York", / "zip": "10001" / }, / "id": 42, / "name": "InovoTools" / }”. A slash marks a line break.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use JSON Sort Keys

Paste a JSON object. Keys are sorted A to Z at every level and the result is pretty-printed.

Examples

  • With the default values
    {
      "active": true,
      "address": {
        "city": "New York",

Limitations and assumptions

Confirm assumptions, units and applicable local rules before relying on results. Detailed content, accessibility and edge-case review remains ongoing.

Frequently asked questions

What does the JSON Sort Keys do?

Sort the keys of a JSON object alphabetically, including nested objects, for clean diffs.

How does the JSON Sort Keys work?

Paste a JSON object. Keys are sorted A to Z at every level and the result is pretty-printed.

What should I keep in mind when using the JSON Sort Keys?

Confirm assumptions, units and applicable local rules before relying on results.

Can I see an example of the JSON Sort Keys?

Example: “{"name":"InovoTools","id":42,"active":true,"address":{"zip":"10001","city":"New York"}}” gives “{ / "active": true, / "address": { / "city": "New York", / "zip": "10001" / }, / "id": 42, / "name": "InovoTools" / }”. A slash marks a line break.

Is the JSON Sort Keys free to use?

Yes. It is free, needs no account and runs in your browser.