JSON Schema Validator

UtiliStudio Workspace Tool

Validate JSON payloads against JSON Schema specifications. Get precise error reporting with JSON pointers, line numbers, and schema auto-generation.

Validate JSON schemas and infer draft specifications directly in your browser
Open in full workspace
Loading JSON Schema Validator…

Key Capabilities

JSON Schema Draft 2020-12 Support

Validate documents against modern JSON Schema standards, including type constraints, required fields, patternProperties, and combinators.

Pinpoint Error Feedback

Receive actionable diagnostic feedback indicating the exact line coordinates, JSON pointer path, and failing schema keyword.

Automatic Schema Generation

Infer a structured JSON Schema Draft 2020-12 definition directly from existing sample JSON data to accelerate schema authoring.

Semantic Format Validation

Check data formats such as email, URI, date-time, UUID, IPv4, and IPv6 alongside custom regex patterns and numeric boundaries.

How to Use JSON Schema Validator

1

Enter JSON document and schema

Paste your JSON data into the payload editor and your JSON Schema into the schema editor pane.

2

Run schema validation

Click Validate to evaluate payload conformance against declared types, required properties, and constraints.

3

Review validation diagnostics

Inspect the diagnostic drawer for green validation passes or red constraint violations with line numbers.

4

Generate or export schema

Use the Schema Generator to infer types from sample payloads or export validated schema files.

Practical Examples

Validating a User Profile against Schema Constraints

A JSON payload validated against required properties and email format constraints.

Input (Raw / Unformatted)
Payload:
{
  "id": 101,
  "email": "user@example.com",
  "active": true
}

Schema:
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["id", "email"],
  "properties": {
    "id": { "type": "integer" },
    "email": { "type": "string", "format": "email" },
    "active": { "type": "boolean" }
  }
}
Output (Formatted & Indented)
Validation Result: PASS
Total Errors: 0
All 3 properties conform to schema constraints.

JSON Schema Validator Guide

What JSON Schema is

JSON Schema is a vocabulary for describing the expected shape of JSON data, written in JSON itself. A schema states which properties an object should have, what type each value must be, which fields are required, and which ranges, patterns, or formats are acceptable. A validator then checks a document against the schema and reports every place where it does not conform.

Schemas act as executable documentation. OpenAPI uses JSON Schema to describe request and response bodies, editors such as VS Code use it to provide autocomplete and warnings for configuration files, and backend services use it to reject malformed input before it reaches business logic.

Drafts and versions

JSON Schema has evolved through several published drafts. Draft-04 and draft-07 are still very common in older tooling. Draft 2019-09 introduced features such as unevaluatedProperties and replaced definitions with $defs, and draft 2020-12, the current version, reorganized array validation with prefixItems.

A schema declares its version in the $schema keyword. Keywords can behave differently between drafts, so always check that the validator you test with supports the same draft as the one your production system uses. A schema that passes in one draft can produce different results in another.

The keywords you will use most

The type keyword restricts a value to string, number, integer, boolean, object, array, or null. For objects, properties defines a sub-schema for each known key, required lists keys that must be present, and additionalProperties controls whether unknown keys are allowed. Setting additionalProperties to false is a simple way to catch typos in field names.

Strings can be constrained with minLength, maxLength, pattern for regular expressions, and enum for a fixed list of allowed values. Numbers use minimum, maximum, and multipleOf. Arrays use items to describe their elements, along with minItems, maxItems, and uniqueItems.

Schemas can be combined. allOf requires every listed sub-schema to match, anyOf requires at least one, oneOf requires exactly one, and not inverts a schema. Reusable pieces are stored under $defs and referenced with $ref, which keeps large schemas maintainable.

Reading errors and writing better schemas

Validation errors usually include two locations: the instance path, a JSON Pointer such as /user/address/zip identifying the failing value in your document, and the schema path identifying the rule that failed. Use the first to find the data and the second to understand the rule.

The format keyword, used for values like email, date-time, uri, and uuid, is treated as an annotation rather than a strict assertion by default in recent drafts. Many validators check formats anyway, but do not rely on format alone for security-sensitive input.

Generating a schema from a sample document is a fast way to start, but a generated schema only describes that one sample. Review it afterwards: mark truly optional fields as optional, add enums and ranges where the domain is known, and decide whether unknown properties should be rejected.

Where schema validation fits in a project

Validating at system boundaries gives the most value. Check incoming API requests and webhook payloads before processing them, validate configuration files when an application starts, and run contract tests in continuous integration to confirm that API responses still match the published schema. Catching a malformed payload at the edge produces a clear error message instead of a confusing failure deep inside the code.

Store schemas in version control next to the code that uses them, and evolve them carefully. Adding an optional property is backward compatible, while adding a new required property or tightening a type can break existing clients, so treat those changes like any other breaking API change.

Common Use Cases

API Request & Response Testing

Verify that REST API payloads conform to OpenAPI or JSON Schema specifications during development.

Webhook Payload Verification

Ensure incoming webhook notifications match expected third-party schema contracts before writing handler logic.

Configuration File Validation

Validate structured project configurations against predefined schemas to prevent runtime deployment failures.

Schema Authoring & Prototyping

Generate initial draft schemas from raw JSON examples and refine property types iteratively.

Frequently Asked Questions

Which JSON Schema draft specifications are supported?

The validator supports modern JSON Schema specifications including Draft 2020-12 and core keywords established in Draft 7.

How are schema errors displayed?

Diagnostics pinpoint the specific JSON pointer path (such as /users/0/email), the violated keyword (such as format or required), and the editor line number.

Can I generate a schema from sample JSON?

Yes. The built-in Schema Generator analyzes sample JSON data types and structures to produce an initial Draft 2020-12 schema automatically.

Related Guides

Related Developer Tools

Ready to use JSON Schema Validator?

The tool is at the top of this page, or open it in the full workspace with tabs, favorites, and Ctrl+K search.