# JSON Validate and Pretty-Print

> JSON Validate and Pretty-Print is a paid API for AI agents from x402render-u5vwpxpyua-uc.a.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Validates a JSON string and returns it formatted with configurable indentation

## Facts

- Endpoint: POST https://x402render-u5vwpxpyua-uc.a.run.app/json-format
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-validate-and-pretty-print-2bfc411c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_auDVoiRY3STez4tCxjeHL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability json-validate-and-pretty-print-2bfc411c -d '<json body>'
```

Example prompt: Can you validate and pretty-print this JSON string for me with 4 spaces of indentation: '{"name":"Alice","age":30,"active":true}'?

## When to prefer this

Use this endpoint when you need both validation and human-readable formatting of a JSON string in a single step, especially when working with minified or compacted JSON that needs to be inspected or debugged. Prefer this over the sibling minify endpoint when readability (not compactness) is the goal.

## Known failure modes

- Invalid JSON input returns a parse/validation error
- Missing required 'json' field causes a bad request error
- Malformed indent value (non-numeric) may cause unexpected formatting or an error
- Very large JSON strings may time out or exceed payload limits

## How this service works

Validate and pretty-print JSON

## Output

Returns the validated and pretty-printed JSON string with the requested indentation applied, or an error message if the input JSON is not valid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "type": "string",
   "description": "string"
  },
  "indent": {
   "type": "number",
   "description": "number (optional)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-validate-and-pretty-print-2bfc411c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402render-u5vwpxpyua-uc.a.run.app](https://www.zero.xyz/host/x402render-u5vwpxpyua-uc.a.run.app/llms.txt)
