Embed this tool on your site
<iframe src="https://devtoolbox.dedyn.io/tools/json-schema-validator" width="100%" height="600" frameborder="0" title="JSON Schema Validator"></iframe>

JSON Schema Validator

Validate your JSON data against a JSON Schema. Paste your schema on the left, your data on the right, and get instant validation results. Everything runs in your browser — your data stays private.

 

About JSON Schema

JSON Schema is a vocabulary that allows you to annotate and validate JSON documents. It describes the structure, constraints, and data types of your JSON data, making it invaluable for API validation, configuration file checking, and data quality assurance.

This tool implements core JSON Schema validation in pure JavaScript, supporting the most commonly used keywords from Draft 4, 6, and 7. It checks type constraints, required fields, string patterns, numeric ranges, array bounds, object structure, and enumerated values — all directly in your browser with no server calls.

Features

Common JSON Schema Keywords

Keyword Applies To Description
type Any Specifies the data type: string, number, integer, boolean, array, object, null
required Object Array of property names that must be present
properties Object Defines schemas for each property of the object
additionalProperties Object Schema for properties not listed in properties; set to false to disallow them
items Array Schema that each item in the array must match
enum Any Value must be one of the specified values
minimum / maximum Number Inclusive lower/upper bound for numeric values
exclusiveMinimum / exclusiveMaximum Number Exclusive lower/upper bound for numeric values
multipleOf Number Value must be a multiple of this number
minLength / maxLength String Minimum/maximum string length (in characters)
pattern String String must match this regular expression
minItems / maxItems Array Minimum/maximum number of items in the array
uniqueItems Array When true, all array items must be unique
minProperties / maxProperties Object Minimum/maximum number of properties in the object

Example Schema

{
  "type": "object",
  "required": ["name", "email", "age"],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "email": {
      "type": "string",
      "pattern": "^[^@]+@[^@]+\\.[^@]+$"
    },
    "age": {
      "type": "integer",
      "minimum": 0,
      "maximum": 150
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": ["admin", "editor", "viewer"]
      },
      "minItems": 1,
      "uniqueItems": true
    }
  },
  "additionalProperties": false
}

Frequently Asked Questions

What is JSON Schema?
JSON Schema is a vocabulary for annotating and validating JSON documents. It defines the expected structure, data types, required fields, value constraints, and patterns for JSON data. It's widely used for API validation and configuration files.
Why use JSON Schema validation?
JSON Schema validates data before processing it, catching errors early. It ensures API request/response payloads match expected formats, validates configuration files, generates documentation, and enables IDE autocompletion for JSON files.
What validation rules does JSON Schema support?
JSON Schema supports type checking (string, number, boolean, object, array, null), required fields, min/max values, string patterns (regex), enum values, array constraints (minItems, maxItems, uniqueItems), and nested object validation.
Keyboard Shortcuts
Ctrl+Enter Run / Format
Ctrl+Shift+C Copy output
Ctrl+L Clear