{"uid":"cap_HGSmE5oN-RFMulCBL4kCr","slug":"saylor-innovations-json-formatter-beautifier-59fb0ad0","name":"Saylor Innovations JSON Formatter & Beautifier","description":"JSON formatter and beautifier - pretty-print or minify JSON with chosen indent and optional key sorting","url":"https://saylorinnovations.com/api/json/format?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["json"],"properties":{"json":{"type":"string","description":"JSON text to format"},"indent":{"type":"string","description":"optional 0-8, default 2"},"sort_keys":{"type":"string","description":"optional true"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["formatted"],"properties":{"indent":{"type":"number"},"formatted":{"type":"string"},"sort_keys":{"type":"boolean","description":"Sort keys"},"checked_at":{"type":["string","null"],"description":"Time the check was run (UTC)"},"input_bytes":{"type":"number","description":"Input, in bytes"},"output_bytes":{"type":"number","description":"Output, in bytes"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_40Pnqdke4s1DtftHNMqkp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pretty-prints or minifies JSON text with configurable indentation and optional alphabetical key sorting","exampleAgentPrompt":"Can you pretty-print this JSON for me with 4 spaces of indentation and sort the keys alphabetically: {\"z\":1,\"a\":2,\"m\":3}?","exampleUseCases":[{"title":"Readable API response debugging","prompt":"I got this ugly minified JSON back from an API and I can't read it — can you format it with 2-space indentation so I can debug it? Here it is: {\"user\":{\"id\":42,\"name\":\"Alice\",\"roles\":[\"admin\",\"editor\"]}}"},{"title":"Sorted config file review","prompt":"Take this JSON config and reformat it with 4-space indentation and sort all the keys alphabetically so it's easier to review in code review: {\"timeout\":30,\"retries\":3,\"host\":\"api.example.com\"}"},{"title":"Minified JSON for production payload","prompt":"I need to minify this pretty-printed JSON into a single compact line with no whitespace before I send it to our production API — can you do that with indent set to 0? {\"name\": \"widget\", \"price\": 9.99, \"stock\": 100}"}],"resultDescription":"Returns the reformatted JSON as a string in the `formatted` field, along with the actual indent level used, whether keys were sorted, the input and output sizes in bytes, and a UTC timestamp of when the operation was performed.","failureModes":["Invalid JSON input causes a formatting error — the endpoint cannot parse malformed JSON","Indent value outside 0-8 range may be ignored or rejected","Extremely large JSON payloads may hit size or timeout limits","Missing required `json` query parameter returns an error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, stateless JSON formatting or minification operation without standing up your own parser — especially useful in agent pipelines that need to normalize JSON output before displaying it to users or passing it downstream. Prefer it over general-purpose code execution when you just need formatting, not computation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:51:40.727Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-json-formatter-beautifier-59fb0ad0"}