JSON Schema Validator
Validate a JSON document against a JSON Schema (draft-07 + formats) — live, in your browser.
Examples
Validate a user object against a schema
Schema: {
"type": "object",
"required": ["name", "email"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"email": { "type": "string", "format": "email" },
"age": { "type": "integer", "minimum": 0 }
}
}
Document: {
"name": "",
"email": "not-an-email"
}2 validation errors:
/name — must NOT have fewer than 1 characters (minLength)
/email — must match format "email" (format)
Expected: string
Got: "not-an-email"Both errors are reported with their instance paths. The allErrors flag means both failures appear, not just the first one.
Validate an array with item constraints
Schema: {
"type": "array",
"items": { "type": "number" },
"minItems": 1
}
Document: ["a", "b", "c"]/0 — must be number (type)
Expected: number
Got: "a"Each non-number item is flagged with its array index as the instance path (/0, /1, /2).
About this tool
JSON Schema is a vocabulary that describes the expected structure of a JSON document — which properties must be present, what types they must have, and what constraints they must satisfy. It is the standard way to validate API request and response bodies, configuration files, and any JSON data that must conform to a contract before being processed.
This validator uses Ajv (Another JSON Schema Validator) with draft-07 support, format validation (email, uri, date-time, and more), strict:false mode (to allow additional keywords without errors), and allErrors mode (which reports every violation, not just the first one). The output shows each error with its JSON pointer instance path and a human-readable message.
How to use
Paste the JSON Schema
Paste the schema that defines the expected structure into the Schema panel. It is validated first so you can confirm the schema itself is well-formed.
Paste the JSON document
Drop the document you want to validate into the Document panel. Each property that violates the schema is reported with its path and a message.
Read the error list
Every validation error is shown with its instance path (e.g. /user/email) and the specific rule that failed. Fix the document and re-validate until all errors clear.
Use cases
Validating API request bodies
Define a JSON Schema for your API payload and validate incoming requests before processing them, catching missing fields and type errors early.
Testing configuration files
Write a schema for your app's config.json and validate it at startup to fail fast with a clear error instead of silent wrong values.
Contract testing between services
Both the producer and consumer of an API can validate against the same JSON Schema, ensuring the contract is honoured without a full integration test.
Common mistakes
Mistake:Using format validation without knowing Ajv's defaults.
Fix:Ajv validates formats by default only when the ajv-formats package is loaded. This tool ships with formats enabled (email, uri, date-time, etc.), but if your schema relies on a format not in that set, it will not be validated.
Mistake:Expecting the validator to coerce types.
Fix:Draft-07 does not coerce types by default. A string '42' will not pass an integer schema. Use type: ['string', 'integer'] if the field can accept both.
Mistake:Forgetting required fields in nested objects.
Fix:The required array lists only top-level properties by default. For nested objects, add required inside the nested object's subschema or use JSON Path conditions.
Frequently asked questions
Related guides
References & standards
Related tools
Base64 Toolbox
Professional Base64 workspace for text, files and images with Base64URL, MIME, Data URI, strict validation, image preview and ready-to-use snippets.
C# to VB.NET Converter
Convert a subset of C# — classes, methods, variables, loops — into VB.NET
CSV Data Viewer
Paste CSV and browse rows in a sortable table with delimiter detection
CSV to Chart
Paste or upload CSV data and generate bar, line, pie, or doughnut charts. Export as PNG.
CSV to JSON Converter
Paste CSV data and convert it to pretty-printed JSON instantly — supports custom delimiters, header row toggling, and value trimming.
CSV to Markdown Converter
Convert CSV to a Markdown table and Markdown tables back to CSV