Developer Tools

JSON Schema Validator

Validate JSON data against common JSON Schema rules including type, required fields, properties, arrays, enums, ranges, and string patterns.

View all Developer Tools

Validation result

Waiting for input
Paste JSON and a schema, then click Validate.

Continue Workflow

Related tools to try next

All tools
Browser Local No sign-up

Example

Validate an API user object

The validator reports whether required fields exist and whether nested values match the expected type and constraints.

Input


                        {
  "id": 42,
  "email": "ada@example.com",
  "roles": ["admin"]
}
                      

Output


                        {
  "type": "object",
  "required": ["id", "email"],
  "properties": {
    "id": { "type": "integer" },
    "email": { "type": "string", "pattern": "^[^@]+@[^@]+\\.[^@]+$" },
    "roles": { "type": "array", "items": { "type": "string" } }
  }
}
                      

Detect a string where a number is expected

The JSON syntax is valid, but schema validation can still flag type drift that would break calculations or database imports.

Input


                        {
  "sku": "plan-pro",
  "price": "29.00"
}
                      

Output


                        {
  "type": "object",
  "required": ["sku", "price"],
  "properties": {
    "sku": { "type": "string" },
    "price": { "type": "number" }
  }
}
                      

Limit status values with enum

Enum checks are useful when API clients should only accept a controlled set of states.

Input


                        {
  "id": "order_123",
  "status": "processing"
}
                      

Output


                        {
  "type": "object",
  "properties": {
    "status": { "type": "string", "enum": ["draft", "paid", "shipped", "cancelled"] }
  }
}
                      

Practical Notes

How to Use

  1. 1. Paste your JSON data into the JSON input panel.
  2. 2. Paste or write a JSON Schema in the schema panel.
  3. 3. Click Validate to check the data against the schema rules.
  4. 4. Review each path-level error and adjust either the data or schema.
  5. 5. Copy the validation report if you need to share the result.

Features

Use Cases

Frequently Asked Questions

What does this JSON Schema Validator check?
It checks common JSON Schema constraints such as type, required, properties, items, enum, const, minimum, maximum, minLength, maxLength, minItems, maxItems, pattern, and additionalProperties.
Is this a complete JSON Schema draft implementation?
No. It is designed for fast browser checks of common schema rules. For advanced keywords such as oneOf, anyOf, allOf, refs, conditionals, and custom formats, use a dedicated JSON Schema library in your build or test workflow.
Does my JSON data leave the browser?
No. Validation runs with JavaScript in your browser, so the pasted JSON and schema are not uploaded to a server.
Should I format JSON before validating it?
Yes. Formatting first makes syntax errors, missing commas, and nesting problems easier to spot before schema-level validation begins.
What is the difference between required and non-empty?
The required keyword means a property must exist. It does not always mean the value is useful. Add rules such as minLength, minimum, minItems, or enum when empty or out-of-range values should fail.
Can schema validation replace API tests?
No. Schema validation is a strong boundary check, but API tests should still cover behavior, authorization, error states, pagination, and business rules.