JSON Schema Validator
Check JSON against a schema and get every error with its path, line and a clear fix.
Problems
Schema warnings
About the JSON Schema Validator
Paste a JSON document and a JSON Schema and find out whether the document follows it. Every problem is listed with its path ($.address.pin), its line and column, the keyword that failed and an explanation in plain words — "Property "restrat" is not allowed here. Did you mean "restart"?" rather than "additionalProperties: false". Show in document selects the offending value in the editor.
The schema is checked too: unknown keywords (typos such as requried), regular expressions that do not compile, $refs that point nowhere, and draft mix-ups such as a draft-04 style exclusiveMinimum: true in a draft-07 schema or OpenAPI's nullable. Drafts 04, 06, 07, 2019-09 and 2020-12 are supported, and formats such as email, uri, date-time and uuid are checked.
How to use it
- Paste the JSON to check on the left and the schema on the right, open two files, or press Load sample.
- Leave Draft on Detect to use the schema's
$schema, or pick a draft. Untick Check formats if you only want structural checks. - If the schema uses
$refto other schema files, open Referenced schemas and paste them there (each with its$id). - Press Validate (or Ctrl/⌘ + Enter). Validation also runs as you type for documents under 1 MB.
- Work through the list: each problem shows where it is and what is expected; Show in document jumps to it. Copy or download the report if you need to share it.
Examples
Schema: {"properties": {"restart": {"type": "string"}}, "additionalProperties": false}
JSON: {"restrat": "always"}Line 1, column 2 · $.restrat — Property "restrat" is not allowed here. Did you mean "restart"?
Schema: {"properties": {"port": {"type": "integer", "maximum": 65535}}}
JSON: {"port": "8080"}Line 1, column 10 · $.port — Expected an integer, got string "8080".
Quoted numbers are strings in JSON. Write 8080 without quotes.
Schema: {"oneOf": [{"type": "string"}, {"type": "number"}]}
JSON: [1, 2]Line 1, column 1 · $ (the whole document) — Expected a string or a number, got array.
When the alternatives differ in more than their type, the closest alternative's problems are listed under the message.
Common uses
- Checking API request and response bodies against the schema from an OpenAPI document or a contract.
- Validating configuration files (tsconfig, package.json, CI settings, app configs) before deploying them.
- Debugging a schema you are writing: see exactly which keyword rejects a test document.
- Testing sample data for a data pipeline, form or importer that has a JSON Schema.
Drafts and keywords
The draft is taken from $schema unless you choose one. Without $schema, draft 2020-12 is used. Draft-06 schemas are checked with the draft-07 rules (draft-07 only added if/then/else and a few annotations). In draft-07 and earlier, keywords placed next to $ref are ignored, as those drafts specify; from 2019-09 on they apply.
Supported: type, enum, const, the number, string, array and object keywords, required, dependentRequired, dependentSchemas and dependencies, properties, patternProperties, additionalProperties, propertyNames, unevaluatedProperties and unevaluatedItems, prefixItems, items, contains with minContains/maxContains, allOf, anyOf, oneOf, not, if/then/else, $ref, $defs/definitions, $anchor and $recursiveRef. $dynamicRef (2020-12) is not supported; the tool warns if a schema uses it.
Formats
With Check formats on, these values are checked: date, time, date-time (RFC 3339 — a time zone such as Z or +05:30 is required), duration, email, hostname, ipv4, ipv6, uri, uri-reference, uri-template, url, uuid, regex, json-pointer and relative-json-pointer. Other formats (for example phone) are not checked, and the tool says so. In drafts 2019-09 and 2020-12, format is an annotation unless a validator is configured to assert it — so another validator may accept values that fail here; untick the box to match that behaviour.
Limitations
- Nothing is downloaded: a
$refto another file works only if you paste that schema under Referenced schemas. - Numbers are compared as 64-bit floating-point values, so
minimum,maximumandmultipleOfare approximate for integers beyond 2^53 and for values with more than 15–17 significant digits. - Duplicate keys in the document are reduced to their last value before validation (as
JSON.parsedoes); the tool warns about them. - The list shows up to 500 problems; validation always covers the whole document.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
Is my JSON or my schema uploaded?
No. Both are parsed and validated in your browser, and the page works offline once loaded — safe for payloads with personal data or credentials.
Why does it say a property "is not allowed here"?
The schema has "additionalProperties": false (or "unevaluatedProperties": false) and the property is not listed under properties or matched by patternProperties. The message lists the allowed names, or suggests the closest one when it looks like a typo.
My schema has no $schema. Which draft is used?
Draft 2020-12, the current version. Choose another draft under Draft if your schema was written for draft-07 or draft-04 — the rules for exclusiveMinimum, tuple items and $ref differ between drafts.
Why are some keywords reported as unknown?
They are not JSON Schema keywords, so every validator ignores them — usually a typo (requried, tpye) or a keyword from another format, such as OpenAPI 3.0's nullable. Names starting with x- and common OpenAPI annotations such as example are not reported.
Can I validate YAML against a schema?
Yes — use the YAML Validator, which converts each YAML document and checks it against a schema you paste or a bundled Docker Compose or GitHub Actions schema.