{"uid":"cap_4B2zYtX6ehLrpKqt9u-ZR","slug":"json-schema-validator-draft-07-2019-09-2020-12-a2c78847","name":"JSON Schema Validator (draft-07 / 2019-09 / 2020-12)","description":"Validate JSON data against a JSON Schema (draft-07, 2019-09, 2020-12) — returns exact error locations, keywords, and messages for programmatic handling. Deterministic schema validation.","url":"https://toolbelt402.tpoborne.workers.dev/json/validate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"description":"Instance to validate"},"draft":{"type":"string","description":"Optional: 7, 2019-09 or 2020-12 (default)"},"schema":{"type":"object","description":"JSON Schema to validate against"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zRv9BLxzzt9xBNrg9o4kR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON data instance against a provided JSON Schema and returns exact error locations, keywords, and messages for programmatic handling.","exampleAgentPrompt":"Can you validate this JSON object against my schema and tell me exactly which fields are invalid, using JSON Schema draft 2020-12? Here's the data: {\"name\": 123, \"age\": \"thirty\"} and here's the schema: {\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}},\"required\":[\"name\",\"age\"]}.","exampleUseCases":[{"title":"API request payload validation","prompt":"Before I send this request body to our API, can you validate it against our JSON Schema and tell me the exact field paths and keywords that fail? Use draft 2020-12. Data: {\"userId\": \"abc\", \"amount\": -5} Schema: {\"type\":\"object\",\"properties\":{\"userId\":{\"type\":\"integer\"},\"amount\":{\"type\":\"number\",\"minimum\":0}},\"required\":[\"userId\",\"amount\"]}."},{"title":"CI pipeline schema conformance check","prompt":"In our CI pipeline, check whether this config file JSON conforms to our draft-07 JSON Schema and return all error locations and messages so our build tool can fail with precise diagnostics. Config: {\"timeout\": \"fast\", \"retries\": 3} Schema: {\"type\":\"object\",\"properties\":{\"timeout\":{\"type\":\"integer\"},\"retries\":{\"type\":\"integer\",\"maximum\":5}},\"required\":[\"timeout\",\"retries\"]}."},{"title":"User form submission validation","prompt":"I have a user-submitted form as JSON and I need to validate it against our 2019-09 schema — can you check it and give me back every error with the exact instance path and schema keyword so I can show the right error message per field? Submission: {\"email\": \"not-an-email\", \"age\": 15} Schema: {\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\",\"format\":\"email\"},\"age\":{\"type\":\"integer\",\"minimum\":18}},\"required\":[\"email\",\"age\"]}."}],"resultDescription":"Returns a structured validation result indicating whether the JSON data is valid against the provided schema, and if not, a list of errors each containing the exact instance path (JSON Pointer), the failing schema keyword, and a human-readable error message suitable for programmatic handling.","failureModes":["Invalid or unparseable JSON schema provided — returns a schema parse error","Unknown draft version specified — returns an unsupported draft error","Malformed request body with missing required fields (data or schema) — returns a 400-level error","Network timeout on the workers.dev edge node — transient failure requiring retry","Data instance is extremely large, potentially hitting payload size limits"],"whenToPreferThis":"Choose this endpoint when you need deterministic, schema-driven validation of JSON data with precise error locations and keywords — especially when you need multi-draft support (draft-07, 2019-09, 2020-12) and structured, programmatically consumable error output. Prefer it over generic linting tools when exact JSON Pointer paths and schema keyword attribution matter, such as in CI pipelines, API gateway validation, or user-facing form error reporting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:36:18.790Z","isFirstParty":false}