Free Online JSON Schema Validator
Validate JSON documents against a JSON Schema.
| # | Data path | Keyword | Message |
|---|
No validation errors were reported.
Validation uses Ajv 6 from a CDN and supports JSON Schema draft-07. Data and schema are processed in your browser; the documents are not uploaded.
About the JSON Schema Validator
JSON Schema describes the shape a JSON document is allowed to take. It can require certain properties, limit a number to a range, constrain a string with a pattern, describe arrays of objects, and compose reusable definitions with references. This validator compares a document against such a schema and reports every mismatch it finds, along with the path to the offending value. It is a quick way to test an API payload, a configuration file, or a fixture before you commit it.
Reading the error list
- Data path: a JSON Pointer-like location such as
/users/2/email, where the root is shown as(root). - Keyword: the schema rule that failed, for example
required,type,minimum, orpattern. - Message: Ajv's human-readable explanation of what was expected and what it saw.
- All errors: the validator collects every failure rather than stopping at the first, so one pass reveals the full list of issues.
Ajv is a fast, standards-focused implementation used widely in production. This page loads version 6, which
implements draft-07 and earlier drafts. A schema that declares draft 2020-12 may use keywords that this version
does not understand, so the validator may report a missing reference or refuse to compile it. For modern
drafts, use a newer Ajv release in your application. The draft badge in the results panel shows what was
detected from the $schema value or reports that no declaration was present.
Some schemas intentionally omit type and rely on value constraints, while others use
oneOf or anyOf to describe alternatives. Those constructs can produce nested errors
that look repetitive. The table keeps them all because the exact path and keyword usually reveals which branch
failed. If a failure seems wrong, check whether the schema itself is valid and whether formats such as email or
date-time are being applied. Unknown formats are ignored by default here to avoid noise from custom
annotations.
The pretty-printed panel shows the parsed document, which confirms that duplicate keys were collapsed and that numbers were interpreted as expected. That view is often enough to spot a trailing comma, a string that should have been a number, or a nested object that arrived as an array. Everything runs locally; the schema and data are parsed by JavaScript in the page and are never sent to the server. The report can be copied or downloaded for a pull request comment or a bug ticket.
How to use this tool
- Paste a JSON Schema into the left editor, or click Sample schema to see a working example.
- Paste the JSON document you want to check into the right editor.
- Click Validate JSON. The summary, error table, and parsed data appear below.
- Copy the error list or download the report when you need to share the result.
Frequently asked questions
Why does the validator reject a schema that works elsewhere?
The page uses Ajv 6, which targets draft-07. Schemas written for draft 2019-09 or 2020-12 may use newer keywords or reference syntax. Remove the $schema line for a quick test, or validate with a newer library.
Does validation change my data?
No. The document is parsed and displayed, but it is never modified. Coercion of strings to numbers and application of default values are disabled, so the result reflects the document exactly as written.
What does an empty error table with a valid result mean?
It means the document satisfied every constraint that Ajv evaluated. Note that some keywords are annotations rather than assertions, and formats can be disabled or ignored depending on configuration.