JSON Schema validator

JSON Schema Validator Online – Validate JSON Against JSON Schema

Valid JSON syntax doesn’t always mean valid application data.

Captain JSON’s JSON Schema Validator helps you validate JSON documents against defined schemas and identify data structure or constraint violations.

Check required fields, property types, and schema rules before using JSON data in your APIs, applications, and integration workflows.

  • 100% offline
  • Privacy first
  • Nothing uploaded

Part of the Captain JSON toolkit — 20+ JSON tools in one extension.

Example: a document that breaks its schema

Illustrative example
JSON document
{  "name": "Alice",  "age": "thirty",  "email": "[email protected]"}
Schema violation: age must be an integer, but a string was supplied.
Cross Browser Support

Available Across All Major Browsers

Your JSON toolkit. Wherever you develop.

Captain JSON brings essential JSON developer utilities into your everyday browser workflow. Escape JSON strings, convert between data formats, inspect JWT tokens, work with JSONL files, validate JSON schemas, and generate code from JSON. Install Captain JSON on your preferred supported browser and access your developer toolkit from one convenient place.

Available today: Google Chrome, Microsoft Edge and Mozilla Firefox. More browsers are coming soon.

What is a JSON Schema validator?

A JSON Schema validator checks whether a JSON document conforms to a schema — the required properties, data types and constraints it must satisfy — which goes beyond checking that the JSON syntax is valid. Captain JSON’s JSON Schema Validator supports Draft-04, Draft-06, Draft-07, Draft 2019-09 and Draft 2020-12 and reports detailed errors with exact error paths.

About Captain JSON: Captain JSON is a browser extension by PiratesOfBugs that provides JSON developer utilities including JSON comparison, formatting, pretty printing and validation.

Features

JSON Schema validator features

Everything the JSON Schema Validator offers, from supported drafts to detailed error paths.

  • Validate JSON against a JSON Schema

    Check a document against the schema you provide.

  • Support Draft-04

    Validate against schemas written for Draft-04.

  • Support Draft-06

    Validate against schemas written for Draft-06.

  • Support Draft-07

    Validate against schemas written for Draft-07.

  • Support Draft 2019-09

    Validate against schemas written for Draft 2019-09.

  • Support Draft 2020-12

    Validate against schemas written for Draft 2020-12.

  • Validate required properties

    Detect missing required properties.

  • Validate data types

    Check that values have the expected types.

  • Validate strings, numbers & arrays

    Apply constraints to strings, numbers and arrays.

  • Validate nested objects

    Check objects inside objects.

  • Validate enums and constants

    Check values against enums and constants.

  • Detailed validation errors

    Read a detailed description of each violation.

  • Show exact error paths

    See the path to each failing value.

  • Test with sample/example data

    Try your schema against example data.

  • Visualize and explore schema structure

    Explore the structure of the schema visually.

Problem & solution

Valid JSON Is Not Always Valid Application Data.

The problem

A JSON document can follow correct JSON syntax but still violate the expected structure of an application or API.

For example, an API might require an integer field, a specific property, or a predefined object structure.

How Captain JSON helps

JSON Schema defines rules for validating these structures.

Captain JSON helps developers and testers validate JSON documents against JSON Schema specifications and identify violations before data reaches downstream systems.

  • Five JSON Schema drafts supported
  • Detailed errors with exact paths
  • Runs locally — your JSON never leaves the browser
Use cases

Perfect For

  • API Contract Validation

    Check responses against the agreed schema.

  • Schema Design

    Try a schema against example data as you design it.

  • Data Validation

    Check data before it reaches downstream systems.

  • Configuration Files

    Make sure configuration matches its schema.

  • OpenAPI Development

    Check example payloads against JSON Schema definitions.

Learn

What Is JSON Schema Validation?

JSON syntax validation checks whether a document is valid JSON: quotes, commas and brackets are all in the right places. The JSON validator does this.

JSON Schema validation goes one step further. It checks whether a valid JSON document conforms to a defined schema: which properties are required, what type each value has and what constraints apply.

In the example below, the document is valid JSON. Whether it is valid data depends on the schema, which requires a string name and an integer age and allows an optional email string. This document satisfies it.

  • JSON syntax validation asks: is this valid JSON?
  • JSON Schema validation asks: does this valid JSON match the schema?
JSON document
{  "name": "Alice",  "age": 30,  "email": "[email protected]"}
JSON Schema (Draft-07)
{  "$schema": "http://json-schema.org/draft-07/schema#",  "type": "object",  "required": ["name", "age"],  "properties": {    "name": {      "type": "string"    },    "age": {      "type": "integer"    },    "email": {      "type": "string",      "format": "email"    }  }}
Versions

Supported JSON Schema Drafts

Supported drafts

  • Draft-04
  • Draft-06
  • Draft-07
  • Draft 2019-09
  • Draft 2020-12

Validate JSON documents against schemas written for any of these drafts. The $schema keyword inside a schema identifies the draft it was written for.

How to use

How to Validate JSON Against a Schema

  1. Step 1

    Open Captain JSON

  2. Step 2

    Navigate to JSON Schema Validator

  3. Step 3

    Paste or load your JSON document

  4. Step 4

    Provide the corresponding JSON Schema

  5. Step 5

    Select or identify the supported schema draft

  6. Step 6

    Execute validation

  7. Step 7

    Review validation results and errors

Examples

JSON Schema validation examples

Using the Draft-07 schema from the section above, here is how three documents fare. They are illustrative examples, not screenshots of the extension.

A valid document

Illustrative example

name and age are present, age is an integer and email is an optional string, so the document conforms to the schema.

Conforms to the schema
{  "name": "Alice",  "age": 30,  "email": "[email protected]"}

Wrong data type

Illustrative example

The schema requires age to be an integer, but the document supplies a string, so validation fails at age.

Violates the schema
{  "name": "Alice",  "age": "thirty",  "email": "[email protected]"}

Missing required property

Illustrative example

The schema lists age as required, but the document omits it, so validation fails.

Violates the schema
{  "name": "Alice",  "email": "[email protected]"}
FAQ

JSON Schema validator: frequently asked questions

What is JSON Schema?

JSON Schema is a vocabulary for describing the structure of JSON data: which properties exist, which are required, what type each value has and what constraints apply. A validator uses a schema to check whether a JSON document conforms to it.

How do I validate JSON against a schema?

Open Captain JSON, choose JSON Schema Validator, paste your JSON document, provide the JSON Schema and run validation. The tool reports any violations with detailed errors and exact error paths. Everything runs in your browser, so your JSON is never uploaded.

What is the difference between JSON validation and JSON Schema validation?

JSON validation, or syntax validation, checks that text is well-formed JSON — see the JSON validator. JSON Schema validation checks that a valid JSON document also conforms to a schema: the right properties, types and constraints. A document can be valid JSON and still fail its schema.

What is a required property in JSON Schema?

A required property is one that must be present in an object. You list the names in the "required" keyword, for example "required": ["name", "age"]. A document that omits any of them fails validation, even if every other property is correct.

What are JSON Schema Draft-04, Draft-06 and Draft-07?

They are successive versions of the JSON Schema specification. Draft-06 added keywords such as const and contains, and Draft-07 added if/then/else conditionals. Captain JSON supports Draft-04, Draft-06 and Draft-07, as well as Draft 2019-09 and Draft 2020-12.

How do I validate API response structures?

Capture a sample API response, write or paste the schema that describes the contract, and validate the response against it. Test with example data as well as edge cases, and use the exact error paths to see which field broke the contract.

Can JSON Schema validate data types?

Yes. The type keyword constrains values to string, number, integer, boolean, array, object or null. Captain JSON validates data types, strings, numbers and arrays, nested objects, and enums and constants.

Is JSON Schema useful for API contract testing?

Yes. A schema is a precise, machine-checkable description of what an API should return, so validating responses against it catches missing fields and wrong types early. Captain JSON isn’t a test runner, but it helps you design and check the schemas your tests will rely on. You can also compare two responses with JSON Compare.

What happens when JSON does not match its schema?

Validation fails and the violations are reported. Captain JSON shows detailed validation errors and the exact path of each failing value, so you can see, for example, that a property has the wrong type or that a required property is missing.

Everything You Need to Work With JSON. In One Toolkit.

From escaping JSON strings and converting data formats to inspecting JWT tokens, working with JSONL, validating schemas, and generating code, Captain JSON brings essential developer utilities together in one browser extension.

  • ✓ 100% Offline
  • ✓ Privacy First
  • ✓ Lightweight

We use analytics cookies to understand how the site is used. No personal data is sold. See our privacy practices before choosing.