JSON Schema Validator Online Free

⚙️ Developer Tools Free Forever

JSON Schema Validator Validate JSON Against Schema Free Online

Paste your JSON and your schema, and instantly see every validation error with its exact property path. Supports all major JSON Schema drafts. No sign up, no server, runs entirely in your browser.

Examples:
JSON Document
JSON Schema
Paste JSON and schema above, then click Validate.
About This Tool

A Draft-07-style JSON Schema validator built as a recursive keyword checker

JSON Schema validation is really a tree walk performed twice at once: once through your data, once through your schema, checking both structures in lockstep. This tool implements that walk directly rather than compiling the schema into a faster validation function first, which is the tradeoff every simple validator makes in exchange for being easy to read and modify.

Validation runs entirely in your browser. No JSON document or schema is transmitted anywhere, since the script contains no network calls at all.

Keyword coverage, aimed at Draft-07

The validator implements the keyword set most commonly used from JSON Schema Draft-07: type, required, properties, patternProperties, additionalProperties, minimum and maximum with their exclusive variants, multipleOf, minLength, maxLength, pattern, a handful of format checks, minItems, maxItems, uniqueItems, items, contains, minProperties, maxProperties, dependencies, the combiners allOf, anyOf, oneOf and not, conditional if/then/else, and internal $ref resolution against the local document.

Step 1 Resolve $ref first If the schema node is a $ref pointing inside the document with #/, the validator walks the pointer path segment by segment against the root schema, decoding ~1 and ~0 per the JSON Pointer spec, then recurses into the resolved schema instead.
Step 2 Check type, short-circuit on failure If the type check fails, the function returns immediately rather than running the rest of the keyword checks, since a string-only rule like minLength is meaningless against a value that already failed to be a string.
Step 3 Run type-specific keyword blocks Separate if-blocks handle numeric, string, array, and object keywords, each guarded by a runtime typeof or Array.isArray check so irrelevant keywords are simply skipped for the wrong data type rather than raising an error.
Step 4 Recurse into children and combiners Object properties, array items, and each combiner branch call the same validate function again with the relevant sub-schema and an extended path string, accumulating errors from every level into one flat array.
// simplified from the actual validator, oneOf handling if (schema.oneOf !== undefined) { var passing = schema.oneOf.filter(function(sub) { return validate(data, sub, path, rootSchema).length === 0; }); if (passing.length !== 1) { errors.push({ path: path, keyword: ‘oneOf’, message: ‘Value must match exactly one of the oneOf schemas (matched ‘ + passing.length + ‘)’ }); } }

How errors are reported

Every failure becomes an object with a JSON Pointer style path built by appending /key or /index as the validator descends, the failing keyword name, and a human-readable message. Combiner failures inside allOf are additionally prefixed with the branch index, like [allOf/2] Minimum length 3, got 1, so you can trace a nested failure back to the exact sub-schema that rejected it.

Format keywordPattern used
emailBasic [email protected] shape, not a full RFC 5322 grammar
dateYYYY-MM-DD, digits only, no calendar validity check
date-timeYYYY-MM-DDTHH:MM:SS prefix match
uuidStandard eight-four-four-four-twelve hex grouping, case-insensitive
ipv4Four dot-separated groups of one to three digits, no range check on 0 to 255
ipv6Loose colon-separated hex group pattern
Format keywords are intentionally loose. The Draft-07 specification itself treats format as an annotation, not a hard constraint, meaning implementations are allowed to validate it loosely or skip it entirely. This validator applies simple regex checks rather than full grammars, so 999.999.999.999 will pass the ipv4 format check even though it is not a real address. Treat format results as a helpful hint, not airtight validation, exactly as the spec intends.

Two keywords that trip people up

additionalProperties: false

Every key in the data is checked against the declared properties list and any patternProperties regex. A key matching neither is flagged. This is the strict mode people reach for when they want to catch typos in field names rather than silently accepting them.

uniqueItems

Implemented as a nested loop doing a deep structural comparison between every pair of array elements, which correctly treats two objects with identical keys and values as duplicates even if they are different object references.

Draft-07 keyword set Internal $ref resolution Recursive combiner checks JSON Pointer error paths

Schema specifications and validators

  • JSON Schema Draft-07 release notes describe the keyword set this tool targets.
  • RFC 6901, JSON Pointer defines the #/path/to/value syntax used for both $ref resolution and error paths.
  • Ajv is the industry standard JSON Schema validator for Node and the browser, supporting Draft-07 through 2020-12 with a compiled validation function for real performance.
  • Understanding JSON Schema is the community reference guide for writing schemas correctly.

Validation work this covers

Checking an API response body against a documented contract before writing client code, validating a configuration file against its schema before a deploy, writing and iterating on a schema definition with instant feedback, and catching malformed data during onboarding of a third party feed before it reaches a database.

Common Questions

Questions About the JSON Schema Validator

JSON Schema is a vocabulary that lets you annotate and validate JSON documents. It defines the structure of valid JSON, which fields are required, what types values must be, what patterns strings must match, and what numeric ranges are acceptable. It is widely used in REST APIs (OpenAPI/Swagger), configuration file validation, database document validation, and data pipelines.

The validator uses a Draft-07 compatible engine that covers the core keywords of Draft 04, 06, 07, 2019 to 09, and 2020 to 12. The differences between drafts mainly affect features like unevaluatedProperties, dynamic references, and vocabulary annotations. The vast majority of real world schemas validate correctly regardless of which draft they target.

The error path uses JSON Pointer notation (RFC 6901). A path like #/address/postcode means the error is at root → address property → postcode property. For arrays, #/items/2/name points to the name field of the third item (index 2). The path lets you locate the exact field that violated the schema without scanning the entire document.

Yes, internal $ref references that point to definitions within the same schema (e.g. #/definitions/Address) are resolved and validated. External $ref URIs pointing to remote schemas are not fetched, since this tool runs offline in your browser. For external references, inline the referenced schema into the $defs or definitions section of your schema.

The format keyword validates: email (RFC 5322 pattern), date (YYYY-MM-DD), date time (ISO 8601), time (HH:MM:SS), uri (basic URL structure), uuid (8 to 4 to 4 to 4 to 12 hex groups), ipv4, and ipv6. Per JSON Schema spec, format validation is optional and does not cause a validation failure by default, this tool enables it so you see format errors as warnings.

Use the items keyword in your schema: {“type”:”array”,”items”:{“type”:”object”,”required”:[“id”],”properties”:{“id”:{“type”:”integer”}}}}. Every element in the array is validated against the items schema, and each error is reported with its array index in the path, like #/2/id for a missing id on the third element.

No. The entire validation engine runs in your browser as JavaScript. Your JSON document and schema never leave your machine. This makes the tool safe to use with internal API payloads, configuration files containing credentials, or any sensitive data you would not want to upload to a third party server.

Yes. OpenAPI 3.x schemas are JSON Schema Draft-07 compatible. Extract the schema object from your API spec (the content → schema block for a given request or response), paste it here, and validate sample payloads against it. This is a fast way to test that a request body is correct before building a full integration test suite.

Privacy Overview

Cookies let this site remember your preferences and show us which tools people actually use. Full detail sits in our Privacy Policy.