Quick start
-
Paste JSON
Left side is model output or sample data.
-
Paste schema
Right side uses object, required, and properties.
Syntactically valid JSON from LLMs or APIs may still violate field types and required keys. This tool validates structured output against JSON Schema locally—reporting missing fields, type errors, and enum violations. Format samples with json-formatter first; tidy OpenAPI component schemas with openapi-formatter before pasting.
Read the full guide: JSON Schema API Design Guide: From Sample Generation to LLM Validation →
Privacy: processed locally, never uploaded.
↓ Paste in the input area below to see results instantly
Validation passed
Supports object type, required, and nested properties; basic type checks only. Not a full JSON Schema implementation.
Syntactically valid JSON from LLMs or APIs may still violate field types and required keys. This tool validates structured output against JSON Schema locally—reporting missing fields, type errors, and enum violations. Format samples with json-formatter first; tidy OpenAPI component schemas with openapi-formatter before pasting.
Paste JSON
Left side is model output or sample data.
Paste schema
Right side uses object, required, and properties.
Pair with JSON Schema from Sample to infer a schema, then validate real outputs here.
To use this tool, first paste the JSON returned by your LLM into the left input box. Then paste your JSON Schema in the right box. Click validate to see highlighted errors including missing fields, type mismatches, and format issues. Fix the errors and re-validate until the output fully complies with your schema.
For complex schemas, validate in phases: check required fields first, then types, finally nested structures. Simplify schema during debugging to isolate issues. Revalidate whenever API responses change, especially after model updates.
Define required, type, enum, pattern constraints. Same schema for LLM structured output and REST contract tests. Valid JSON may fail schema—json-formatter first, then validate.
Extract schemas from OpenAPI components—openapi-formatter tidies large specs before copy.
System prompt declares schema; retry or fallback on validator failure. Use llm-json-extractor to strip Markdown fences.
token-counter keeps schema + examples within context.
Browser tool for ad-hoc; CI uses ajv with the same schema file. Error paths ($.items[2].price) pinpoint bugs.
json-diff before/after fixes against schema changes.
Input
{"name":"Ada","score":98} Output
Valid or issue list
Focused on nested objects; review complex arrays manually.
Not entirely. While we check structural compliance, real-world usage requires testing field semantics, null handling, text truncation etc. Combine with unit tests and sandbox validation.
See tool implementation—complex $ref may need simplification.
yaml-converter first for YAML instances or schemas.
No.
email/date-time format support varies—use pattern for critical rules.