Format or Minify JSON
format_jsonFormat JSON by pretty-printing or minifying it, with precise error location for invalid input.
Instructions
Pretty-print or minify JSON exactly, with precise error location when it is invalid. Prefer this to reformatting a large document yourself — it cannot drop or alter a value. Web version: https://buildutilities.com/json-formatter
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"json": "<json>"
},
"name": "format_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON text | |
| mode | No | pretty | |
| indent | No | ||
| sortKeys | No | Sort object keys — useful for diffing two payloads |