JSON Schema Validator

Validate JSON data against a JSON Schema (Draft-7) in your browser. Errors shown with paths and line numbers. Powered by AJV. No upload.

Did we solve your problem today?

What is a JSON Schema Validator?

A JSON Schema Validator checks whether a JSON document conforms to a set of rules defined in a JSON Schema. This tool validates your JSON data against a schema instantly in your browser — powered by AJV (Another JSON Validator), one of the fastest and most standards-compliant JSON Schema implementations available.

How to Use

  1. Paste your JSON data into the left textarea
  2. Paste your JSON Schema into the right textarea
  3. Click Validate — or let the live validator run automatically as you type
  4. Review the results: a green status means valid, red means errors were found
  5. Click any error in the list to jump to the relevant line in your JSON data
  6. Use Load Example to see a working person-object schema with matching data

What is JSON Schema?

JSON Schema is a vocabulary for describing the structure and validation rules of JSON data. It is defined in a series of specifications called “drafts”. The most widely used version is Draft-07, which this tool supports by default via AJV.

A JSON Schema is itself a JSON document. It can specify:

JSON Schema Draft Versions

DraftReleaseKey Features
Draft-042013First IETF version; $schema, $ref, definitions
Draft-062017const, contains, propertyNames, examples
Draft-072019if/then/else, readOnly, writeOnly, $comment
Draft 2019-092019$anchor, $recursiveRef, unevaluatedProperties
Draft 2020-122020$dynamicRef, prefixItems, simplified $ref

This tool validates using JSON Schema Draft-07 — the most widely adopted version, supported natively by AJV without additional plugins.

Common JSON Schema Patterns

Required object with typed fields

{
  "type": "object",
  "properties": {
    "name": { "type": "string", "minLength": 1 },
    "age":  { "type": "integer", "minimum": 0 }
  },
  "required": ["name", "age"],
  "additionalProperties": false
}

Array of strings

{
  "type": "array",
  "items": { "type": "string" },
  "minItems": 1,
  "uniqueItems": true
}

Enum with fixed values

{
  "type": "string",
  "enum": ["draft", "published", "archived"]
}

Understanding Error Paths

Errors use JSON Pointer notation (RFC 6901):

Clicking on an error in the list focuses the JSON editor on the corresponding line.

Why AJV?

AJV is used by millions of projects including webpack, eslint, and fastify. It compiles schemas to optimised JavaScript functions, making validation extremely fast even for large documents. Unlike regex-based validators, AJV correctly handles all JSON Schema semantics including $ref resolution, allOf/anyOf/oneOf composition, and conditional schemas with if/then/else.

Privacy

All validation is performed entirely in your browser. No JSON data or schema is sent to any server, stored, or logged. The AJV library runs locally after the page loads — you can even disconnect from the internet and the tool will continue to work.

FAQ

What JSON Schema drafts are supported?

This tool uses AJV (Another JSON Validator) which supports JSON Schema Draft-04, Draft-06, and Draft-07. Draft-07 is the default and most widely used version.

Is my data sent to a server?

No. All validation runs locally in your browser using AJV compiled to JavaScript. Your JSON data and schema never leave your device.

What does the error path mean?

Error paths use JSON Pointer notation (RFC 6901). For example, "/address/city" means the "city" property inside the "address" object. "(root)" means the top-level value failed validation.

Why does my schema produce unexpected results?

Common pitfalls include forgetting "additionalProperties: false" (by default extra fields are allowed), using "type: integer" when you mean "type: number", or missing required field declarations.

Can I validate JSON arrays with this tool?

Yes. Set your schema type to "array" and use the "items" keyword to define the type for each element. The tool will report exactly which array index failed.