Tool Kumar tool
JSON Schema validator
Paste a JSON document and its JSON Schema to check one against the other as you type. Each error shows where it is, as a JSON Pointer with its line and column, which rule failed and why. Drafts 2020-12, 2019-09, 07, 06 and 04 are supported, and nothing leaves your browser.
How to use this tool
- Paste the JSON document in the left editor, or open a file.
- Paste the JSON Schema in the middle editor or open a schema file. Generate from the document in its ⋯ menu infers a schema to start from.
- Read the result on the right: Valid, or every error with its location. Click an error or press Enter to select it in the document; its keyword button selects the rule in the schema.
- Fix the document or the schema. Both are checked again as you type, and Ctrl+Z (⌘Z on a Mac) undoes changes in either editor.
Worked example
This user record breaks six rules of the 2020-12 schema below. The output is what the validator reports for it: each error with its JSON Pointer, line and column, its message and the keyword that failed. 19.999 is not a multiple of 0.01: the numbers are compared exactly, with no floating-point rounding.
Schema · user.schema.json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "User",
"type": "object",
"required": ["id", "name", "email"],
"properties": {
"id": { "type": "integer", "minimum": 1 },
"name": { "type": "string", "minLength": 1 },
"email": { "type": "string", "format": "email" },
"age": { "type": "integer", "minimum": 0 },
"role": { "enum": ["admin", "editor", "viewer"] },
"tags": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"balance": { "type": "number", "multipleOf": 0.01 }
},
"additionalProperties": false
}
Input · user.json
{
"id": 7,
"name": "Ada",
"age": "36",
"role": "owner",
"tags": ["admin", "admin"],
"balance": 19.999,
"nickname": "ada"
}
Output
Invalid: 6 errors (2020-12)
1. Missing required property "email"
at (root), line 1, column 1 · keyword /required
2. Expected integer, got string
at /age, line 4, column 10 · keyword /properties/age/type
3. Must be one of: "admin", "editor", "viewer"
at /role, line 5, column 11 · keyword /properties/role/enum
4. Items 0 and 1 are equal: items must be unique
at /tags, line 6, column 11 · keyword /properties/tags/uniqueItems
5. Must be a multiple of 0.01
at /balance, line 7, column 14 · keyword /properties/balance/multipleOf
6. Property "nickname" is not allowed
at /nickname, line 8, column 3 · keyword /additionalPropertiesSupported drafts and keywords
Drafts 2020-12, 2019-09, draft-07, draft-06 and draft-04 are supported, each with its own rules. The draft named by $schema decides; an embedded schema resource with its own $id may name another draft. draft-04 reads id, the boolean exclusiveMaximum and exclusiveMinimum, and an integer only without a fraction or exponent. Before 2019-09, $ref replaces its sibling keywords.
Core: $schema, $id (id in draft-04), $ref, $defs and definitions, $anchor, $dynamicRef and $dynamicAnchor (2020-12), $recursiveRef and $recursiveAnchor (2019-09), and plain-name fragments in $id before 2019-09.
Applicators: allOf, anyOf, oneOf, not, if, then, else, dependentSchemas and dependencies, prefixItems, items, additionalItems, contains, properties, patternProperties, additionalProperties, propertyNames, unevaluatedItems and unevaluatedProperties.
Assertions: type, enum, const, multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, maxItems, minItems, uniqueItems, maxContains, minContains, maxProperties, minProperties, required and dependentRequired. String length counts characters (code points), and pattern is an ECMA-262 regular expression with the u flag.
Numbers are compared by their exact decimal value. multipleOf 0.01 accepts 19.99, a maximum of 18446744073709551615 holds for integers beyond JavaScript’s safe range, and 1 equals 1.0 for const, enum and uniqueItems.
References, remote schemas and privacy
$ref resolves JSON Pointers such as #/$defs/address, anchors such as #address, and other resources embedded in the same schema by their $id, relative URIs included. A loop that applies the same schema to the same value again is reported instead of hanging the page.
A $ref to a schema on the web is fetched only when you ask. Until then it is listed as unresolved and that part of the document isn’t checked, so a document without other errors reads Not fully checked rather than Valid; the same goes for a keyword whose value is broken. The results list each address with a Fetch referenced schemas button, which fetches them straight from your browser, without cookies, and validates again; addresses those schemas refer to are listed for another click. Fetched schemas stay in that tab and are never saved or shared. An address that fails says why, most often a server that doesn’t allow cross-origin requests, and stays unresolved. To work without fetching, add the schema under $defs with its $id: references to that URL then resolve locally. The official meta-schemas of every supported draft, with the 2019-09 and 2020-12 vocabularies, come with the validator, so a $ref to one resolves by its http or https address without fetching anything, even offline. To check a schema against its draft, paste it as the document and use {"$ref": "https://json-schema.org/draft/2020-12/schema"} as the schema. Your own schema is checked without them: the validator knows the valid values of every keyword it supports.
What isn’t supported
draft-03 (validated as draft-04, with a warning) and drafts after 2020-12. contentEncoding, contentMediaType and contentSchema are read as annotations, not checked. The $vocabulary of a custom meta-schema isn’t read, because the meta-schema isn’t fetched. The output lists errors, not annotations.
idn-hostname follows IDNA2008 with the browser’s Unicode data, so a few code points newer than your browser’s data may be judged differently.
Tested against the official test suite
The validator runs the JSON-Schema-Test-Suite of the JSON Schema organization for every draft it supports. As of November 2026 it passes all 5,133 required tests (draft-04 672, draft-06 878, draft-07 972, 2019-09 1,292, 2020-12 1,319), all 2,776 format tests with Check formats on, and 760 of the 764 optional ones, including the bignum, float-overflow, ECMAScript regex and cross-draft tests. The four it fails are draft-07 content tests, which expect contentEncoding and contentMediaType to be checked.
Options and edge cases
- The draft comes from $schema. A schema without one uses the draft picker in the schema toolbar: 2020-12 by default, or 2019-09, draft-07, draft-06 or draft-04.
- Check formats turns format into a check for date-time, date, time, duration, email, idn-email, hostname, idn-hostname, ipv4, ipv6, uri, uri-reference, iri, iri-reference, uri-template, json-pointer, relative-json-pointer, regex and uuid. Off, format is an annotation, as 2019-09 and 2020-12 specify.
- Each error lists its JSON Pointer, line and column, its message and the keyword path through any $ref. When anyOf or oneOf matches nothing, the errors of the closest branch are listed under it. Keyword buttons above the list show only one kind of error.
- Schema problems are listed apart from document errors and underlined in the schema: an unresolved $ref, an invalid regular expression, a keyword with a value of the wrong type, and warnings for unknown keywords, keywords of another draft or OpenAPI’s nullable.
- Comments and trailing commas in either text are tolerated and noted. A JSON Lines document is validated one record at a time.
- The first 1,000 errors are listed and the count includes all of them. Validation runs in a background worker, so typing stays responsive with documents of several megabytes, and a run that takes too long, such as a catastrophic regular expression, is stopped.
Private by default
Your document stays in this browser. Tool Kumar parses, converts and creates downloads on your device, with no account or upload step.
JSON Schema validator questions
- What changed between draft-07 and 2020-12?
- 2019-09 added $defs, $anchor, dependentRequired, dependentSchemas, unevaluatedProperties, unevaluatedItems, minContains and maxContains, and lets $ref sit beside other keywords. 2020-12 replaced the array form of items with prefixItems, items with additionalItems, and $recursiveRef with $dynamicRef. The validator applies each draft’s rules to schemas that name it in $schema.
- What is the difference between additionalProperties and unevaluatedProperties?
- additionalProperties only sees the properties and patternProperties next to it, so with allOf or $ref it rejects properties that another subschema defines. unevaluatedProperties, from 2019-09 on, sees every property that the schema and its successful subschemas evaluated, including through allOf, anyOf, oneOf, if, then, else and $ref. Use it to close a schema that is built from parts.
- Why isn’t format checked by default?
- From 2019-09 on, the specification makes format an annotation unless a validator is asked to assert it, and earlier drafts left it optional. Turn on Check formats to validate date-time, email, uri, uuid, ipv4, ipv6 and the other standard formats. Unknown formats always pass, with a warning while the check is on.
- How do I allow null values?
- Add "null" to the type, as in "type": ["string", "null"], or combine schemas with anyOf. OpenAPI 3.0’s "nullable": true is not a JSON Schema keyword, so the validator ignores it and shows a warning that says so.
- Are big numbers and decimals checked exactly?
- Yes. The document and the schema are read without converting numbers to floating point, so 19.99 is a multiple of 0.01, integers larger than 2^53 keep every digit for minimum and maximum, and exponents of any size, as in 1e400, are compared as written. 1.0 counts as an integer from draft-06 on, as the specification says.
Related tools
JSON Schema generator, JSON validator and linter, JSON to Zod, JSON to TypeScript.