Cryonel

JSON Schema Validator

Validate a JSON document against a JSON Schema right in your browser — check required fields, types, enums, string/number ranges, and array constraints.

How to use it

Paste your schema and the JSON you want to check, then click Validate. This tool implements a practical subset of JSON Schema Draft-07: type, required, properties, additionalProperties, items, enum, const, minimum/maximum/exclusiveMinimum/exclusiveMaximum/multipleOf, minLength/maxLength/pattern, and minItems/maxItems.

Schema and instance are different documents

The schema describes allowed data; the instance is the JSON value being checked. Both must first be valid JSON. A successful result means the instance satisfies the supported keywords on this page, not that it is safe for every business operation. Authentication, authorization, database constraints, cross-field rules, and remote-resource checks belong at their appropriate application boundaries.

Presence, type, and null are separate

required controls whether an object property must be present. The property's own schema controls which values it accepts. A required string cannot be omitted or replaced with null unless null is explicitly allowed by the schema vocabulary being used. Conversely, an optional property is still validated when it appears. Distinguishing missing, null, empty string, and zero prevents many API compatibility bugs.

Control unknown object properties

properties defines known names, but unknown names remain allowed unless the schema sets additionalProperties to false or provides a schema for them. Strict rejection can catch typos and unexpected payload drift, while extensible objects are easier to evolve. Apply strictness deliberately at the correct object level; placing it on a parent does not automatically close every nested object.

Validate arrays and scalar constraints

items validates array elements, and length keywords constrain the number of elements. String length and pattern rules apply to string values; numeric boundaries and multiples apply to numbers. Remember that JavaScript and JSON use one general number representation, even though the validator distinguishes values with no fractional part as integers. Extremely large integers can lose precision in a browser before validation.

Read issue paths from the root

Validation errors identify the path where a supported rule failed. Start at the root marker and follow property names or array indexes to the offending value. Fix the data when it violates the contract; change the schema only when the contract itself is wrong. Re-run all representative examples after a schema edit because relaxing one branch or tightening another can affect more than the first reported issue.

Know this tool's scope

This fast local checker intentionally omits references, schema composition, dynamic anchors, custom formats, unevaluated properties, and other advanced vocabulary. Use a full implementation in production and pin the intended draft, format behavior, and remote-reference policy. Untrusted schemas can also contain expensive patterns or deeply nested structures, so production validation should enforce input-size, recursion, and execution limits. Both documents entered here remain in the current browser tab and are not uploaded.

Frequently Asked Questions

Is this a full JSON Schema implementation?

No — advanced keywords like $ref, allOf/anyOf/oneOf, patternProperties, and schema composition aren't supported. For those, use a full validator library such as Ajv in your codebase.

Which JSON Schema draft is this based on?

The supported keywords are compatible with Draft-07 and later drafts, since this core validation vocabulary hasn't changed across versions.

Does required mean a value cannot be null?

No. required controls property presence; the property's schema separately controls whether null is accepted.

Related Tools