JSON Formatter / JSON Key Sorter

Formatting changes whitespace and indentation only, preserving key order; sorting recursively reorders keys at every level (including objects inside arrays) and fixes indentation at two spaces. Use formatting to see structure, sorting to remove "order-only" noise.

JSON FormatterJSON Key Sorter
Touches indentationYes, width and tabs selectableYes, fixed at two spaces
Changes key orderNo, preserved as-isYes, recursively through objects and arrays
Output already formattedYesYes — sorting emits indented JSON
Typical useExpand a minified one-linerCheck whether two responses differ only in field order
Format & Minify

JSON Formatter

Uses the browser's native JSON API to format and minify, with optional key sorting and custom indentation. Everything runs locally.

Format & Minify
Format & Minify

JSON Key Sorter

Recursively sorts every JSON key in ascending order, including nested objects and arrays. Everything runs locally.

Format & Minify

When to use JSON Formatter

  • Debugging an API response and you want the nesting visible.
  • The field order from the server matters — in some APIs it does.
  • You only want it readable, with no comparison planned.

When to use JSON Key Sorter

  • Two payloads are equal but their keys came back in different orders, so the diff is pure noise.
  • Normalising a config file so later edits only show real changes.
  • Comparing two objects line by line.

Verdict

After sorting you do not format again — the sorter already emits indented JSON. Formatting, in the other direction, never removes order noise.

Other comparisons

All tools