# x402 JSON Normalize

> x402 JSON Normalize is a paid API for AI agents from x402-utils.558686.xyz, paid per call via x402, $0.0001/call, status unknown (last checked 2026-09-13).

Validates, normalizes, and deterministically hashes a JSON string, with optional pretty-printing

## Facts

- Endpoint: POST https://x402-utils.558686.xyz/v1/tools/json-normalize
- Price: $0.0001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-json-normalize-08117a82
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OAk3XFrj8oqeGS__JgZku

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 x402-json-normalize-08117a82 -d '<json body>'
```

Example prompt: Normalize this JSON string '{"b":2,"a":1}' into canonical key-sorted form and give me its stable SHA-256 hash so I can deduplicate it.

## When to prefer this

Choose this endpoint when you need cheap, deterministic, repeatable JSON normalization and hashing without spinning up an LLM. It is ideal for deduplication pipelines, pre-signing canonicalization, content-addressable caching, or any workflow where you need a stable, key-sorted JSON representation and a SHA-256 fingerprint. At $0.002 USDC per call it is cost-effective for high-frequency agent loops.

## Known failure modes

- Invalid JSON input returns valid:false with no normalized output
- Missing 'json' field in request body causes a 400-level error
- Malformed request body (non-JSON content type) may cause parsing failure
- Extremely large JSON strings may cause timeout or payload rejection

## How this service works

A compact x402 utility surface for agents that need cheap, repeatable non-LLM transformations before spending on heavier routes: CSV cleanup, JSON Schema checks, timestamp conversion, JWT decode, URL normalization, hashes, codecs, and text utilities.

## Output

Returns a JSON object with: a boolean 'valid' indicating whether the input is valid JSON, a 'normalized' string containing the canonicalized (key-sorted) JSON, and a 'stableHashSha256' string containing the deterministic SHA-256 hash of the normalized form. Also echoes back the tool name, route, input, and a 'deterministic' flag confirming repeatability.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "json-normalize",
  "input": {
   "json": "{\"b\":2,\"a\":1}",
   "pretty": false
  },
  "route": "/v1/tools/json-normalize",
  "result": {
   "valid": true,
   "normalized": "normalized_example",
   "stableHashSha256": "stableHashSha256_example"
  },
  "project": "x402-utility-tools",
  "deterministic": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-json-normalize-08117a82/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-utils.558686.xyz](https://www.zero.xyz/host/x402-utils.558686.xyz/llms.txt)
