01What is Structured Output Schema Checker?
Structured Output Schema Checker reads a JSON Schema you paste and lists what a model API would reject before you send a request. That saves a round trip of trial requests and vague 400 errors. Choose a target. For OpenAI Structured Outputs in strict mode, the checks follow OpenAI's supported schemas section. The root must be an object and must not use anyOf. Every object needs additionalProperties: false, and every property must be listed in required. Unsupported keywords such as allOf, not, if, then, else, dependentRequired and dependentSchemas are errors. Other keywords outside the documented list, like minLength, are warnings. String format must be one of the documented values. The tool also counts the documented limits: 5,000 object properties, 10 levels of object nesting and 1,000 enum values. It also checks 120,000 characters across property names, definition names, enum and const values, plus 15,000 characters for a string enum with more than 250 values. When there are errors, it writes a fixed strict version. Optional properties become required and accept null, with null added to any enum. additionalProperties: false is set on each object, and unsupported keywords are removed. Each change is listed. Anything it cannot fix, such as a root anyOf or an unsupported format, is flagged for you. Here is a worked example. A schema has name in required, plus an optional tags array of objects with an optional label enum of "a" and "b". The checker reports 4 errors. The fixed version makes tags type ["array","null"] and label ["string","null"] with enum ["a","b",null]. It also adds additionalProperties: false to both objects. For Gemini, the checks use the Schema object from the generateContent API reference, a subset of OpenAPI 3.0. Fields outside that list, such as additionalProperties, $ref and $defs, are errors. A type list must be replaced with nullable, enum values must be strings, and required names must exist in properties. Gemini also accepts plain JSON Schema through responseJsonSchema. This tool checks the older responseSchema form only and does not rewrite it. You can paste a bare schema or an OpenAI wrapper with name, schema and strict. It also unwraps response_format and text.format. Nothing leaves your browser. Limits: this is a static check against documented rules, not a call to either API. Removing allOf can leave an empty items schema, so read the fix notes. A clean result means no documented rule is broken. It does not promise the API will accept every keyword it only warns about.
Developers wiring LLM responses into typed code who need a schema that OpenAI or Gemini will accept the first time. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Structured Output Schema Checker
- Pick OpenAI Structured Outputs or Gemini responseSchema as the target
- Paste your JSON Schema, or an OpenAI json_schema wrapper, into the input box
- Read the list of errors and warnings, each with the path where it occurs
- For OpenAI, review the change notes under the auto-fixed version
- Copy the fixed schema and test it in your own request
03Worked examples
- Input:
{"type":"object","properties":{"name":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["a","b"]}}}}},"required":["name"]} - Result:
4 errors: additionalProperties missing at $ and $.properties.tags.items; "Every property must be listed in required. Missing: tags." and "Missing: label." Fixed: {"type":"object","properties":{"name":{"type":"string"},"tags":{"type":["array","null"],"items":{"type":"object","properties":{"label":{"type":["string","null"],"enum":["a","b",null]}},"required":["label"],"additionalProperties":false}}},"required":["name","tags"],"additionalProperties":false} - Target: OpenAI. Error messages shortened
- Input:
{"type":"object","properties":{"name":{"type":"string"},"age":{"type":["integer","null"]}},"required":["name","age"],"additionalProperties":false} - Result:
0 errors, 0 warnings. No problems found against the documented rules. - Target: OpenAI. Already strict
- Input:
{"name":"invoice","strict":true,"schema":{...total, issued (format date), email (format idn-email), lines with items {"allOf":[{"$ref":"#/$defs/Line"}]}, $defs.Line with sku minLength 3...}} - Result:
Error $.properties.email: format "idn-email" is not one of the supported formats. Error $.properties.lines.items: "allOf" is not supported. Warning $.$defs.Line.properties.sku: "minLength" is not in OpenAI's documented list. Fix notes: Removed "allOf" at $.properties.lines.items. Still needs a manual fix at $.properties.email. - Target: OpenAI. Input abbreviated; the full schema is in the loader example. The fix leaves lines.items as {}
- Input:
{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean"}},...},{"type":"object","properties":{"error":{"type":"string"}},...}]} - Result:
Error $: The root schema must not use anyOf. Error $: The root schema must be an object (type: "object"). Both listed as "Still needs a manual fix". - Target: OpenAI. Input abbreviated
- Input:
{"type":"object","properties":{"a":{"type":["string","null"]},"b":{"$ref":"#/$defs/B"}},"required":["a","c"],"additionalProperties":false,"$defs":{"B":{"type":"string"}}} - Result:
5 errors, 1 warning: additionalProperties and $defs are not Schema fields, required lists "c", a type list must use nullable, $ref is not a Schema field, and b has no type (warning). - Target: Gemini responseSchema
- Input:
{"type":"OBJECT","properties":{"title":{"type":"STRING"},"rating":{"type":"INTEGER","nullable":true,"enum":[1,2,3]}},"required":["title"],"propertyOrdering":["title","rating","summary"]} - Result:
Error $.properties.rating: Gemini enum values are strings. Warning $: propertyOrdering lists "summary", which is not in properties. - Target: Gemini responseSchema
04Common use cases
- Finding out why an OpenAI request with strict: true returns a schema error
- Turning a Pydantic or Zod generated schema into one that strict mode accepts
- Checking that a large enum stays inside OpenAI's documented size limits
- Porting an OpenAI schema to Gemini responseSchema and seeing which fields to drop
- Reviewing a teammate's schema before it goes into production code
- Spotting a root-level union that has to become a wrapper object
05Tips
- OpenAI expresses an optional field as required plus a null type, so a fixed schema means the model may now return null for those fields.
- Removing allOf or if/then/else drops constraints, so add those rules to your own validation code after parsing.
- Warnings mark keywords that are not in OpenAI's documented list; test them with a real request before you rely on them.
- For Gemini, consider responseJsonSchema if you need $ref or additionalProperties, since responseSchema does not list them.
- If the root needs to be a union, wrap it in an object with one property that holds the anyOf.
06Related concepts
JSON Schema, Structured Outputs, strict mode, responseSchema, additionalProperties, OpenAPI 3.0.
Frequently Asked Questions
What is Structured Output Schema Checker?
Structured Output Schema Checker is a free, browser-based developer tool on AIDToolStack. Paste a JSON Schema and see what OpenAI Structured Outputs strict mode or Gemini responseSchema would reject, with an auto-fixed strict version for OpenAI. It requires no installation or sign-up and works entirely in your browser.
Is Structured Output Schema Checker free to use?
Yes. No sign-up, no fees and no usage cap.
Does Structured Output Schema Checker store my data?
No. It runs in your browser; nothing is uploaded.