{"uid":"cap_zV5AdktywfnIuQ66TdivJ","slug":"json-formatter-c6444bbb","name":"JSON Formatter","description":"Format 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.","url":"https://agent-data-tools.revmesh2074.workers.dev/json/format?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"The JSON text"},"indent":{"type":"string","description":"2 (default), 4 or tab"},"sortKeys":{"type":"string","description":"true to sort object keys"}}},"responseSchema":{"type":"object","properties":{"formatted":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","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_2BK5ukgjhywyxhQnGAg0n","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":"Formats and pretty-prints a JSON string with configurable indentation and optional key sorting","exampleAgentPrompt":"Can you pretty-print this JSON for me with 4-space indentation and sort the keys alphabetically: {\"z\":3,\"a\":1,\"m\":2}?","exampleUseCases":[{"title":"Prettify minified API response","prompt":"This API returned minified JSON that's impossible to read — can you format it with 2-space indentation so I can review it? Here it is: {\"id\":\"abc\",\"status\":\"ok\",\"data\":{\"value\":42}}"},{"title":"Sort and indent config file","prompt":"I have a JSON config file and I want the keys sorted alphabetically and indented with tabs — can you reformat it? Here's the content: {\"version\":1,\"name\":\"myapp\",\"debug\":false}"},{"title":"Normalize JSON before diff comparison","prompt":"Before I compare these two JSON blobs, can you format both with 4-space indentation and sorted keys so the diff is clean? Start with this one: {\"b\":2,\"a\":1}"}],"resultDescription":"Returns a single 'formatted' field containing the input JSON string reformatted as pretty-printed text with the requested indentation style (2 spaces by default, 4 spaces, or tabs) and optionally with object keys sorted alphabetically.","failureModes":["Invalid JSON input returns an error rather than a formatted result","Missing required 'text' query parameter causes a validation error","Malformed indentation parameter value may fall back to default behavior"],"whenToPreferThis":"Use this endpoint when you need a simple, cheap ($0.001), stateless JSON formatting operation with no API key or account required — ideal for agents that need to normalize, prettify, or sort JSON on the fly as a utility step in a larger workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T12:37:56.953Z","isFirstParty":false,"canonicalSlug":"json-formatter-c6444bbb"}