Format or minify JSON
format_jsonValidate JSON and return it pretty-printed or minified, optionally with object keys sorted A-Z (recursively; array order is kept). Returns the formatted JSON as text. Invalid JSON returns an error naming the problem and its position. Input up to 100 KB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON text to validate and format | |
| indent | No | 2 or 4 spaces, a tab, or minify to remove all whitespace | 2 |
| sortKeys | No | Sort object keys alphabetically at every level |