๐Ÿ”ง

JSON Validate, Format & Analyze API

Validate JSON syntax, pretty-print with configurable indent, minify, get stats (depth, key count, types), or extract values by dot-bracket path. 100% local โ€” instant, zero external calls.

API Docs $0.001 / request

About this tool

One endpoint, five modes: validate (syntax check with error position), format (pretty-print with configurable indent), minify (compact output), stats (depth, key count, type map), and get (extract a value by dot-bracket path like user.name or items[0].id). All processing is local โ€” no external API calls, instant response.

Mode: validate (default)

curl -X POST https://api.iteratools.com/json/validate \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"json": "{\"name\": \"John\", \"age\": 30}"}'
{"ok":true,"valid":true,"data":{"formatted":"{\n \"name\": \"John\",\n \"age\": 30\n}","keys":2,"depth":1,"mode":"validate"}}

Mode: format (pretty-print)

curl -X POST https://api.iteratools.com/json/validate \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"json": "{\"name\":\"John\"}", "mode": "format", "indent": 4}'

Mode: minify

curl -X POST https://api.iteratools.com/json/validate \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"json": "{\n \"name\": \"John\",\n \"age\": 30\n}", "mode": "minify"}'
{"ok":true,"valid":true,"data":{"minified":"{\"name\":\"John\",\"age\":30}","original_length":40,"minified_length":22,"savings_pct":45}}

Mode: stats

curl -X POST https://api.iteratools.com/json/validate \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"json": "[{\"id\":1,\"name\":\"Alice\"},{\"id\":2,\"name\":\"Bob\"}]", "mode": "stats"}'
{"ok":true,"valid":true,"data":{"keys_total":4,"depth":2,"type":"array","array_length":2,"types":{"object":2,"number":2,"string":2}}}

Mode: get (extract by path)

curl -X POST https://api.iteratools.com/json/validate \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"json": "{\"user\":{\"name\":\"Alice\",\"role\":\"admin\"}}", "mode": "get", "path": "user.name"}'
{"ok":true,"valid":true,"data":{"path":"user.name","value":"Alice","found":true,"type":"string"}}

Pricing

$0.001 per request via x402 micropayment on Base (USDC). No external API calls โ€” processing is always instant.

Full Documentation Browse All Tools