Skip to content
UniKit

JSON Schema validator

Validate JSON data against a JSON Schema (draft-07) entirely in the browser: type, required, properties, items, enum, const, numeric and string constraints, anyOf/oneOf/allOf and same-document $ref — every error reported with its JSON Pointer path.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Result

Fill in both the JSON data and the schema to validate

What this tool does

  • Gate an integration with a schema before you go further: catch missing fields and wrong types at validation time instead of at runtime.
  • Validate upstream data: check a provider’s sample JSON against the schema you wrote and confirm the required fields and constraints really hold.
  • Documentation and fixtures: keep the schema as part of the interface contract and re-check sample payloads whenever they change.
  • Debug "why does this fail validation": errors are listed with JSON Pointer paths, so you land straight on /tags/0 rather than guessing.

Example

Input

Data {"id": 1, "name": "UniKit", "tags": ["yaml", "json"]}
Schema (draft-07): type object, required ["id","name"], properties with id as an integer with minimum 1, name as a string with minLength 2, and tags as an array of strings with uniqueItems true

Output

Validation passed: the data matches this JSON Schema

Change the data to {"id": 0, "tags": ["a","a"]} and you get three problems: the root is missing the required property name, /id is below the minimum of 1, and /tags/0 has duplicate items.

Frequently asked questions

Which JSON Schema version is supported?

Draft-07. It covers type, required, properties, items, enum, const, numeric and string constraints (minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minLength, maxLength, pattern), array and object count constraints, additionalProperties, plus anyOf / oneOf / allOf / not and same-document $ref. Remote cross-document $ref never triggers a network request; it reports that the reference does not exist in the current document.

Does passing validation mean the data is correct?

No. A schema only guarantees that the structure and types satisfy the constraints; it cannot express business rules such as "the end time must be after the start time" or "the id must exist in the database". It catches the cheapest and most common mistakes, and your application code still has to handle the rest.

What format are the error paths in?

JSON Pointer (RFC 6901), starting with / and drilling down to the failing location: /tags/0 is the first element of the tags array, and root-level errors are shown as "(root)". Every entry also lists the keyword and message — required, minimum, uniqueItems — so you can group and handle them by type.

What if the data or the schema is not valid JSON?

The tool says which side failed and gives the line, column and reason. A structurally invalid schema (a wrong type value, a required that is not an array of strings) is reported separately rather than being silently treated as a pass.

Does validation go online?

No. Parsing, $ref resolution and validation all run in your browser, no network request is made, it works offline, and neither the data nor the schema is uploaded or logged.

Keywords:json schemajson schema 验证json 校验schema validatorvalidate jsondraft-07$refjson pointer数据校验结构校验

Related tools