JSON Schema Validator
Put a JSON Schema on the left and the JSON data to check on the right, and get live validation with the exact failing field path and reason. Includes a one-click OpenAI function calling example. It implements a common subset of keywords, not the full JSON Schema spec.
FreeOnline Tool
Loading…
How to Use
- Enter your schema definition in the left "JSON Schema" box and the data to validate in the right "JSON data" box.
- Validation runs automatically as you type; the "Validate" button also triggers it manually.
- A green "validation passed" banner appears on success. On failure, every error is listed with the exact field path (such as
data.ageordata.items[2]) and the reason (for example "expected number, got string"). - Press "Load sample data" for an example that exercises required, enum, pattern and other keywords.
- Press "Load OpenAI function calling example" to load a typical function/tool definition schema together with matching arguments, so you can check that an LLM tool call payload is shaped correctly.
Features
- Supported keyword subset: type (including integer, meaning a whole number), required, properties, enum, minLength, maxLength, minimum, maximum, pattern, items and additionalProperties - enough for everyday JSON structure checking.
- Explicitly not a complete implementation of the JSON Schema draft spec: $ref, oneOf, anyOf, allOf and other advanced composition keywords are not supported, and the page says so directly.
- Failures point at the exact field path, including nested objects (
data.user.age) and array indices (data.items[2]), with a human-readable reason. - When additionalProperties is false, extra properties are detected and reported.
- A built-in "OpenAI function calling example" button makes it easy to check that an LLM tool/function argument schema is valid.
- Validation runs purely in local JavaScript; neither the schema nor the data is uploaded.
Use Cases
Checking LLM function calling arguments
When defining a function calling tool for OpenAI or Claude, verify that the parameter schema and a sample argument payload actually match before integration testing.
Validating API request and response shapes
Describe a request or response body with a schema and quickly check that your test data conforms to the agreed structure.
Config file structure checks
Confirm that a JSON config file has the required fields and legal enum values, so a formatting mistake does not become a runtime failure.
Designing form data structures
Express field types, lengths and value ranges as a schema while designing a form, then confirm test data meets the design.
FAQ
Does it implement the full JSON Schema specification?
No. It implements a common subset of keywords (type, required, properties, enum, minLength, maxLength, minimum, maximum, pattern, items, additionalProperties). $ref, oneOf, anyOf, allOf, $defs and other advanced features are not supported - use a dedicated JSON Schema library for complex cases.
Which type values are supported?
string, number, integer, boolean, object, array and null. integer additionally checks that the value is a whole number while number accepts any numeric value including decimals, matching how parameters are commonly declared for OpenAI function calling.
What do the error messages look like?
Each error carries the exact field path (such as data.age or data.items[2]) plus the reason, for example "expected number, got string", so you can find the offending field immediately.
What is the OpenAI function calling example?
It is a typical LLM tool/function calling parameter schema showing how type, properties, enum and required describe the arguments of a weather lookup function. One button loads it for you.