JSON Schema Validator

Validate JSON data against a JSON Schema with detailed error messages and path highlighting.

About This Tool

Need to quickly validate JSON against a schema before deploying an API change? Paste your data and schema below to get instant, detailed feedback on every validation error at once. JSON Schema is the industry standard for describing the structure, types, and constraints of JSON documents. For quick formatting and syntax checking of your JSON data before validation, try the JSON Formatter. It is widely adopted in API development, configuration management, and data pipeline validation to ensure data integrity before it reaches application logic.

This tool is powered by <a href="https://ajv.js.org/" target="_blank" rel="noopener noreferrer" className="text-primary underline underline-offset-2"

Ajv (Another JSON Validator) , the fastest and most widely used JSON Schema validator for JavaScript. Ajv supports JSON Schema drafts including Draft-04, Draft-06, Draft-07, and Draft 2019-09 / 2020-12. The validator runs with allErrors mode enabled, meaning it reports every validation failure in a single pass rather than stopping at the first error. This gives you a complete picture of all issues in your data at once.

Format validation is included via the ajv-formats package, which adds support for common string formats defined in the JSON Schema specification such as email, uri, date, date-time, ipv4, ipv6, uuid, and more. This means your schema can enforce not just types and structure, but also semantic string formats without writing custom validation logic.

All processing happens entirely in your browser. Your JSON data and schemas never leave your machine — there are no server round-trips, no logging, and no third-party analytics on your input. This makes the tool safe for validating sensitive payloads such as internal API responses, authentication configurations, and private data contracts. From debugging a failing API request to testing schema definitions before deploying them, this validator provides instant, detailed feedback on every issue in your data. When comparing schema versions, the Diff Viewer and Text Diff Merger can help you track and reconcile changes between drafts.

How to Use

  1. Paste or type your JSON data into the JSON Data panel on the left.
  2. Paste or type your JSON Schema into the JSON Schema panel on the right.
  3. Click the Validate button or press Ctrl+Enter to run validation.
  4. If valid, a green success message appears. If invalid, each error is listed with its instance path, keyword, message, and parameters.
  5. Use the Sample button to load example JSON data and a matching schema to see how validation works.
  6. Click Copy or press Ctrl+Shift+C to copy the validation results to your clipboard.
  7. Click Clear to reset both panels and start over.

Popular JSON Schema Examples

View all 25 JSON Schema examples &rarr;

FAQ

What is JSON Schema validation?

JSON Schema validation is the process of checking whether a JSON document conforms to a schema that defines expected types, required fields, value ranges, string patterns, and other constraints. It is commonly used to validate API request and response bodies, configuration files, and data interchange formats.

Which JSON Schema drafts are supported?

This tool uses Ajv, which supports Draft-04, Draft-06, Draft-07, and Draft 2019-09 / 2020-12. You can specify the draft version in your schema using the $schema keyword. If omitted, Ajv defaults to Draft-07 behavior.

What format validations are supported?

The ajv-formats plugin provides validation for standard string formats including email, uri, uri-reference, date, date-time, time, ipv4, ipv6, uuid, hostname, json-pointer, and regex. You can use these in your schema with the format keyword.

Is my data safe?

Yes. Validation is performed by the Ajv library running as a JavaScript module inside your browser. Your JSON payloads and schema definitions never leave your machine — there are no server round-trips, no cloud processing, and no data logging. This makes it safe to validate sensitive API responses, auth configs, and private data contracts.

Why are all errors shown at once?

The validator runs with Ajv's allErrors option enabled. This means it does not stop at the first validation failure but continues to check the entire document. This gives you a complete list of all issues so you can fix them in one pass rather than iterating through errors one at a time.

What does the instance path mean in error messages?

The instance path (e.g. /address/zip) is a JSON Pointer that identifies the exact location in your JSON data where the validation error occurred. A path of / refers to the root of the document. Nested paths like /users/0/email point to specific properties within arrays and objects.

Can I validate against schemas with $ref references?

Yes, Ajv supports $ref for internal references within the same schema document (e.g. #/definitions/Address or $defs in newer drafts). External URL-based references are not fetched automatically since the tool runs entirely client-side, but you can inline the referenced schemas into your definitions.

Related Tools