How to validate JSON against a JSON Schema with an API

Updated 2026-11-10

Use when an agent must check a JSON value against a JSON Schema and get the paths of any errors.

From an MCP client, add https://tanod.dev/mcp and call validate_json; its free daily calls are applied automatically, no key or signup.

POST an instance and a schema to /v1/json/validate. It returns valid and a list of errors, each with the path into the instance, the path into the schema, a message and the failing keyword.

Request

The draft comes from the schema's $schema, default 2020-12; 2019-09, 7, 6, 4 and 3 are recognised. Up to 100 errors are returned. formats_checked lists the format keywords that were enforced.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/json/validate \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"instance": {"name": 1, "email": "nope"}, "schema": {"type": "object", "required": ["name", "age"], "properties": {"name": {"type": "string"}, "age": {"type": "integer"}, "email": {"type": "string", "format": "email"}}}}'

Response

Response (example from the API spec, trimmed)
{
  "valid": false,
  "errors": [
    {
      "path": "",
      "schema_path": "/required",
      "message": "'age' is a required property",
      "validator": "required"
    },
    {
      "path": "/name",
      "schema_path": "/properties/name/type",
      "message": "1 is not of type 'string'",
      "validator": "type"
    }
  ],
  "error_count": 3,
  "truncated": false,
  "draft": "2020-12",
  "formats_checked": ["date", "date-time"],
  "note": "Remote $ref documents are never fetched; embed them under $defs.…",
  "source": {
    "library": "jsonschema",
    "license": "MIT"
  }
}

Limits and caveats

No remote references. Remote $ref documents are never fetched and are refused with a 422 remote_ref_forbidden. Embed them under $defs.

Formats. Only the formats listed in formats_checked are enforced; other format values are annotations. An invalid schema is a 422 invalid_schema.

Validation runs in an isolated, resource-limited process; input too complex for its limits is a 422 and not charged. Privacy. Tanod does not log or store the submitted text; it is processed in memory for the answer.

Price and free allowance

USD 0.001 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared with FX rates, QR codes, geocoding, public holidays and the other utility endpoints (phone, validation, text, hash, convert and similar). MCP tool: validate_json at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/util?via=json-schema-validation-api as a custom connector (steps), then ask in plain words, for example "Check this JSON against this JSON Schema and show me any errors." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.

Related guides: How to convert between JSON, YAML, CSV, TOML and XML with an API, How to compare two texts and get a diff with an API, How to hash text with SHA-256, Keccak-256 and other algorithms via API. Back to tanod.dev or the guide index. Results are automated and heuristic.