JSON Schema Validator Online

Paste a JSON Schema and JSON instance to check required fields, types, ranges, patterns, composition, and other schema rules. Validation runs locally in your browser.

Auto reads the schema’s $schema URI.

Advertisement

JSON Schema

0 characters · 1 lineSelf-contained schemas only

JSON instance

0 characters · 1 lineAny JSON root value
Ctrl/Cmd + Enter validates

Validation result

Ready. The validation engine loads when needed.
Waiting for input

Load the example or enter a schema and JSON instance, then select Validate JSON.

How to validate JSON with a schema

  1. Paste or open a self-contained JSON Schema.
  2. Paste or open the JSON value you want to test.
  3. Use auto-detection or select the schema draft explicitly.
  4. Select Validate JSON and follow each instance path and message.

What the result tells you

The instance path is a JSON Pointer to the failing value. The keyword names the rule, while the schema path points to the rule that failed. A root-level error uses /.

/users/0/email · required · must have required property 'email'
#/properties/users/items/required

Common JSON Schema checks

GoalKeywordsExample
Require an object fieldtype, required, properties{"type":"object","required":["id"]}
Limit numbersminimum, maximum, multipleOf{"type":"integer","minimum":1}
Constrain textminLength, maxLength, pattern{"type":"string","pattern":"^[A-Z]+$"}
Constrain arraysitems, prefixItems, uniqueItems{"type":"array","minItems":1}
Combine rulesallOf, anyOf, oneOf, not{"anyOf":[{"type":"string"},{"type":"null"}]}

Draft 2020-12 uses prefixItems for tuple positions and gives items a different role than older drafts. Choose the draft that matches the schema rather than changing keywords until errors disappear.

Engine, privacy, and limits

This page uses pinned Ajv 8.17.1 browser bundles for JSON Schema draft 2020-12, 2019-09, and draft-07. The engine validates the schema against its meta-schema before validating the instance. Validation does not coerce types, insert defaults, remove properties, or otherwise modify data.

Local $ref values such as #/$defs/address work. Remote references are not fetched, so schemas that depend on another URL must be bundled first. The format keyword is treated as an annotation; email, URI, date, and similar formats are not checked on this page.

Schema input is limited to 1 MB and instance input to 5 MB. Compilation and validation run in a Web Worker and stop after 8 seconds so an unusually complex schema or pattern cannot indefinitely freeze the page. Up to 200 errors are displayed, while all returned validation errors remain available in the copied or downloaded report. Exact performance depends on schema complexity and the browser.

Technical behavior reviewed against JSON Schema draft 2020-12 documentation and Ajv 8 browser guidance on .

JSON Schema validator FAQ

What is JSON Schema validation?

It checks whether a JSON instance follows constraints such as required properties, types, ranges, patterns, allowed values, and combinations of rules. Syntax validation only checks whether the text can be parsed as JSON.

Which JSON Schema drafts are supported?

Draft 2020-12, draft 2019-09, and draft-07 are supported. Auto mode reads the schema’s $schema URI and defaults to draft 2020-12 when the keyword is absent.

Does this validator upload my JSON?

No. The schema, instance, and local files are processed in the browser and are not sent to Starlight Tools. Pinned validation engine files are downloaded from cdnjs, but editor contents are not part of those requests.

Does it resolve remote $ref URLs?

No. Local references work, but remote schemas are not downloaded. Paste a self-contained schema or bundle external references first.

Does format validate email addresses, dates, or URIs?

No. This page treats format as an annotation because the optional Ajv formats package is not loaded. Structural and validation keywords are still checked.

Why is valid JSON rejected by the schema?

Valid JSON may still violate schema constraints. Review the instance path, keyword, message, and schema path to find the exact mismatch.

Can I validate a JSON array or primitive value?

Yes. Both the schema and instance may use any valid JSON root value, including an object, array, string, number, boolean, or null.

Explore more tools