{} LLM JSON Schema View source ↗

OpenAI · Anthropic · Gemini

Make any JSON Schema provider-correct.

Each model provider accepts a different schema dialect, so a schema that works with one gets rejected by the next. Paste yours, pick a provider, and get a schema it will accept — with every change explained and the exact doc rule cited.

Input schema or JSON example
Output

      
Change ledger

Paste a schema and hit Convert — every transform will be listed here with the doc rule it enforces.

↳ Nothing leaves your browser. The schema is parsed, transformed, and linted entirely in client-side JavaScript. No server, no logging, no account.

Common rejections, and the rule behind each

The errors developers actually hit when sending a JSON Schema to an LLM API — what they mean, and the one change that fixes them. Every fix links the provider's own doc.

OpenAI · strict
Invalid schema for response_format: 'additionalProperties' is required to be supplied and to be false.

Every object needs additionalProperties: false

In strict mode OpenAI requires additionalProperties: false on every object in the schema — including nested ones. Missing it on any level fails the whole request.

Fix → Convert to OpenAI adds it everywhere.

Full fix + examples → openai structured outputs docs ↗
OpenAI · strict
Invalid schema: required is required to be supplied and to be an array including every key in properties.

All fields must be in required

Strict mode has no concept of optional fields — every property must appear in required. To keep a field effectively optional, make it nullable with "type": ["string", "null"].

Fix → Convert forces required and nullables the ones you left out.

Full fix + examples → openai structured outputs docs ↗
OpenAI · strict
Invalid schema: 'anyOf' is not permitted at the root level.

Root can't be anyOf (or a non-object)

The root of a strict schema must be an object and must not use anyOf. Move the union down into a property. not and if/then/else aren't supported at all. allOf and oneOf are conditional: a single-member allOf is flattened and an allOf of open objects is merged, while oneOf becomes anyOf only when its branches are provably mutually exclusive.

Fix → Convert flags a root anyOf, flattens or merges allOf where that's lossless, and tells you when a oneOf can't be rewritten without widening it.

openai structured outputs docs ↗
Gemini · responseSchema
Fields returned in an unpredictable order / wrong order in structured output.

Gemini needs propertyOrdering

Gemini decides field order from propertyOrdering, an array of property names. Without it, output order is unstable and can hurt quality. It's part of Gemini's schema subset, not standard JSON Schema.

Fix → Convert to Gemini adds propertyOrdering to every object.

gemini structured output docs ↗
Gemini · responseSchema
400 INVALID_ARGUMENT: Unknown name "$ref" / "pattern" in responseSchema.

Gemini supports only a schema subset

No $ref/$defs, no pattern, no minLength/maxLength. String format is limited to date-time, date, and time. Anything else must be removed or inlined.

Fix → Convert to Gemini drops unsupported keywords and flags $ref.

Full fix + examples → gemini structured output docs ↗
Anthropic · input_schema
tools.0.custom.input_schema: input_schema does not support oneOf, allOf, or anyOf at the top level.

No union at the root of a tool schema

A tool input_schema must have an object root with properties. A top-level oneOf/allOf/anyOf is rejected — move the union down into a property, where it's allowed.

Fix → Convert to Anthropic wraps a root union under a property.

Full fix + examples → anthropic tool use docs ↗
Anthropic · input_schema
tools.0.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12.

Properties present but required missing

Claude requires a required array whenever an object has properties — even an empty one. Zod-style generators often omit it for all-optional objects; thinking models reject it hardest.

Fix → Convert to Anthropic adds required (empty array is valid).

Full fix + examples → anthropic tool use docs ↗