JSON Schema Validator Online
Check a JSON document against your own JSON Schema (Draft-07) and see exactly which values break which rules, with escaped JSON Pointer paths. Validation runs in an isolated worker in your browser.
Your text never leaves your browser.
Validates automatically as you type. Reset clears results and keeps your content; edit or press Validate to resume.
Summary
- Status
- Waiting
- Errors
- —
- Draft
- Draft-07
Paste a JSON Schema and a JSON document, or load a sample, to start validating.
What JSON Schema validation checks
A JSON Schema is a JSON document that describes what another JSON document should contain. It lists which properties are required, what type each value must be, which numbers and string lengths are allowed, which formats strings must follow and how nested objects and arrays are shaped. Validation compares your data against those rules and reports every place where the data breaks one.
Paste the schema on the left and the document on the right. Validation runs automatically about a third of a second after you stop typing, and the Validate button reruns it on demand.
JSON syntax validation vs. JSON Schema validation
Syntax validation answers one question: can this text be parsed as JSON at all? A missing comma or an unquoted key fails it. The JSON Formatter & Validator handles that job and pretty-prints the result. Schema validation goes further and asks whether a well-formed document has the right content. {"age": "twenty"} is perfectly valid JSON but fails a schema that expects an integer.
This tool keeps the two apart. If either editor contains broken syntax, the result is Invalid JSON with the parser message, and no schema rules are evaluated or reported.
How to validate an API request or response
Copy the request body or response payload from your browser developer tools, an HTTP client or a log, and paste it into the JSON data editor. Paste the schema from your API contract into the schema editor. Many OpenAPI definitions embed JSON Schema objects under components/schemas; copy a single schema and move any shared parts under definitions so local $ref links resolve.
If the payload is in YAML, convert it first with the YAML to JSON Converter. If it is a JSON Lines log, the JSONL Converter turns it into an array you can describe with items.
Required fields, types, ranges and nested objects
required lists properties that must exist. A property that is present with the value null counts as present, so it fails type rather than required. type accepts string, number, integer, boolean, object, array and null. Ranges use minimum, maximum, exclusiveMinimum, exclusiveMaximum and multipleOf; strings use minLength, maxLength, pattern and format.
Nested objects are described with properties inside properties, and arrays with items. Combine rules with allOf, anyOf, oneOf, not and if/then/else. Set additionalProperties to false to reject keys the schema does not list.
Sample schema and expected results
{
"type": "object",
"required": ["name", "age"],
"properties": {
"name": {"type": "string", "minLength": 1},
"age": {"type": "integer", "minimum": 18}
},
"additionalProperties": false
}{"name":"Ana","age":20}{"name":"","age":16,"extra":true}
/name minLength at least 1 character
/age minimum at least 18
/extra additionalProperties not allowed/name required property is missing
/age type expected integer but found string
How to read JSON Pointer error paths
Every error starts with the location of the affected value written as a JSON Pointer (RFC 6901). /address/city is the city key inside address, /tags/2 is the third array item and (root) is the whole document. For missing required properties and disallowed extra properties, the property name is appended, so a missing name on the root reports /name.
Keys containing a tilde or slash are escaped: ~ becomes ~0 and / becomes ~1, so the key a/b appears as /a~1b. The schema path shows which rule failed, for example #/properties/age/minimum.
Draft-07 support, local $ref and safety limits
This release supports JSON Schema Draft-07 only, powered by Ajv with ajv-formats. Boolean schemas work: true accepts any JSON and false rejects everything. Local references such as #/definitions/address resolve; remote and external references are never fetched and are reported as schema errors. Unknown keywords and unknown formats are rejected rather than silently ignored. The Ajv-only $async extension is unsupported. For a property named __proto__, use patternProperties with ^__proto__$; literal __proto__ entries in schema property maps are rejected because Ajv skips them.
Schemas are untrusted input, so compilation and validation run in an isolated Web Worker that is stopped after 1.5 seconds. Schemas are limited to 100,000 and data to 200,000 UTF-16 code units, nesting to 64 levels, and parsed values to 10,000 for the schema and 50,000 for the data. At most 100 errors are shown, and the list says when it is capped.
Documents are parsed with the standard JSON.parse, which stores numbers as 64-bit floating point. Integers beyond 9,007,199,254,740,991 and numbers with many decimal places may lose precision, so range checks on such values are approximate. Extremely large exponents can overflow to Infinity.
Frequently asked questions
What is the difference between a JSON validator and a JSON Schema validator?
A JSON validator only checks syntax: quotes, commas, brackets and value types are written correctly. A JSON Schema validator first requires valid syntax and then checks the content against rules you define, such as required fields, allowed types, number ranges and string formats. Syntax errors are reported as Invalid JSON here, never as schema violations.
Which JSON Schema draft is supported?
Draft-07. A schema without "$schema" is treated as Draft-07, and "http://json-schema.org/draft-07/schema#" is accepted. A schema that declares another draft, such as 2019-09 or 2020-12, is rejected with a message instead of being silently interpreted as Draft-07, because some keywords behave differently between drafts.
Why is "18" reported as the wrong type for an integer field?
Validation never coerces types. The JSON string "18" is text, not a number, so it fails "type": "integer". The validator also never inserts default values, removes extra properties or changes your document in any way.
Can I use $ref to reference other schemas or URLs?
Only local references inside the same schema, such as "#/definitions/address", are supported. Remote URLs and external files are never fetched; a reference that points outside the schema, or one that cannot be resolved, is reported as a schema error.
How do I read a path like /items/0/price?
It is a JSON Pointer. Each segment after a slash is an object key or array index, so /items/0/price is the price property of the first item in the items array. (root) means the whole document. In keys, "~" is written as "~0" and "/" as "~1".
Why does an unknown format make my schema invalid?
If an unrecognized format were ignored, every string would pass and invalid data could look valid. Formats such as email, uri, uuid, date, date-time, time, hostname and ipv4 are supported; any other format name is reported as a schema error.
Is my schema or data uploaded anywhere?
No. Parsing, schema compilation and validation all run in a Web Worker inside your browser. Nothing is sent to a server, stored, added to the URL or included in analytics.
Why did validation time out?
Each run is stopped after 1.5 seconds to keep the page responsive. A timeout usually means a "pattern" regex with catastrophic backtracking, deeply nested combinators or very large input. A timeout is not the same as Invalid: the document was simply not checked.