Skip to content
Search

Tools

JSON Schema Validator for LLM Output: Check and Repair JSON

Validate JSON against a schema without sending it anywhere. Paste the JSON Schema you gave the model and the LLM's JSON output: the checker repairs the usual breakage, shows what it changed, and lists every place the output doesn't match the schema.

Everything happens in this tab. Nothing you type is stored or sent anywhere, and closing the tab clears it.

Result

Paste a schema and an output, or load the sample.

The checker covers the JSON Schema keywords most structured output uses, and lists any it skipped. It checks the shape of the data. A value can match the schema and still be wrong.

How to validate JSON against a schema from an LLM

When you ask a model for structured output, you usually describe the shape you want with a JSON Schema: which properties exist, which are required, their types and the values allowed. Models often get close but not exact. The answer comes wrapped in a code fence, with a trailing comma, single quotes or a value outside the list you allowed.

This checker does what your code should do with every answer. It parses the output, and if that fails it applies the common repairs and shows each one, with a line-by-line view of what changed. Then it validates the result against your schema and lists every mismatch with a JSON Pointer path to the exact property, so you can see where the model went wrong.

It checks the keywords structured output schemas use: type, properties, required, additionalProperties, items and prefixItems, enum and const, the number, text and list limits, pattern, common formats like date-time and email, allOf, anyOf, oneOf, not, if then else, and references inside the same schema. Anything else it lists as not checked. Function calling and tool use rely on the same schemas, so it works for checking tool arguments too.

Questions

Is my JSON sent to a server?

No. Parsing, repair and validation all run in this browser tab, with no network requests and nothing saved. Reloading the tab clears both boxes.

Should my app repair JSON like this?

As a fallback, yes, with care. Repair the harmless breakage, then validate against the schema, and retry or reject when validation fails. Never accept an answer just because it parses.

Which JSON Schema versions does it support?

It reads the keywords common to the recent drafts, including both the older and newer forms of tuples and exclusive limits. Keywords it doesn't check are listed under the result, so you know what a pass covers.

Why does it say a property is not allowed?

Your schema sets additionalProperties to false, and the output has a property the schema doesn't list. Either the model added a field, or a property name differs by a letter or its case.

Does a valid result mean the data is right?

No. The schema checks shape and allowed values. A customer name can be a valid string and still be the wrong customer, so check the facts against your source.