JSON Schema validator - check if JSON matches a schema
You have a JSON Schema and a JSON payload - do they match? Paste both, pick the draft, and get a list of errors in a second.
Each error shows four pieces of info: the JSON Pointer (where the problem is), the keyword that failed (type, required, pattern, enum, format), the line number in the data textarea, and a plain-English explanation ("Expected type integer", "Missing required property: email").
Under the hood we use ajv - the same library used by Express, Fastify and openapi-generator. Everything runs in your browser: the schema and the data never leave your machine.
How to use it
- Paste your JSON Schema in the left panel, and the JSON data in the right panel.
- Pick the schema draft at the top (Draft 2020-12, 2019-09 or 7). The default 2020-12 fits most modern schemas.
- Turn on format validation so `"format": "email"` actually checks the email syntax (without it, format is only a hint).
- Strict mode is unforgiving: unknown keywords, inconsistent types = schema compilation error.
- Below you see a list of errors with pointers and explanations. "Load example" loads a ready schema + valid data.
- "Generate valid example" synthesizes from the schema a minimal JSON that passes validation - a good starting point.
When this is useful
Real scenarios with APIs and data:
- API response testing - you have a backend response and a schema in the docs - do they actually match? Paste both, get a diff of mismatches.
- Configuration validation - VSCode `settings.json`, ESLint config, package.json, Kubernetes manifests - all have schemas. Validate your config before shipping.
- Debugging 400 errors from an API - the client sends JSON, the server replies "Validation error". Paste your payload and the schema from Swagger/OpenAPI to know exactly which field is wrong.
- Contract testing - your CI/CD pipeline checks that the mock-server response matches the documented schema. Do it manually here before pushing.
- Schema migrations - changing data format with thousands of records? Quickly check how many fit the new schema.
- Writing schemas - while designing a schema, it helps to immediately see whether a sample object validates.
To generate a schema from existing JSON, use our JSON Schema generator. To explore JSON structure, see the JSONPath tester. For JSON formatting, use the JSON formatter.