JSON formatter, pretty-print: pretty-print JSON with indentation, optionally with sorted keys
json_formatFormat JSON with indentation (2 or 4 spaces, or tabs) and optionally sorted keys. Returns the formatted text. Use to make machine JSON readable or to normalise it for diffs. Example: text={"b":2,"a":1}. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The JSON text | |
| indent | No | 2 (default), 4 or tab | |
| sortKeys | No | true to sort object keys |