JSON Formatter and Validator API - pretty print, minify, sort keys
json_formatterValidate JSON and pretty-print or minify it, optional key sorting, with a clear error and position when invalid. Runs on our server, files are deleted right after the call, nothing stored. Free: 25 calls/day per IP. Paid: $0.001 per call via x402 at https://radarbg.com/x402/json-formatter.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "{\"b\":1,\"a\":[1,2]}"
},
"name": "json_formatter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | pretty or minify | pretty |
| text | Yes | The text | |
| indent | No | Indent 2 or 4 | 2 |
| sortKeys | No | Sort keys A-Z |