JSON Schema to structured output converter (OpenAI, Claude, Gemini)
OpenAI strict mode needs additionalProperties: false and every property in required; Claude rejects numeric and string-length constraints and recursion; Gemini accepts a subset of keywords. Paste a schema or a sample object and get a version each provider accepts, with each change explained from its docs.
Updated
OpenAI strict mode
13 changes
10 rewritten, 3 removed, 0 warnings
- Fail · OpenAI strict mode13 items to fix or check
- Fail · Anthropic Claude10 items to fix or check
- Fail · Google Gemini3 items to fix or check
OpenAI strict mode schema
{
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Not enforced by the API: minLength 3; maxLength 120."
},
"priority": {
"type": "string",
"enum": [
"low",
"normal",
"urgent"
]
},
"assignee": {
"type": [
"string",
"null"
],
"format": "email"
},
"estimate_hours": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 200
},
"tags": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"maxItems": 5
},
"customer": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string"
},
"site": {
"type": [
"string",
"null"
],
"description": "Not enforced by the API: format uri."
}
},
"required": [
"name",
"site"
],
"additionalProperties": false
}
},
"required": [
"title",
"priority",
"assignee",
"estimate_hours",
"tags",
"customer"
],
"additionalProperties": false
}
- Properties
- 8
- Object nesting levels
- 2
- Optional properties
- 0
- Enum values
- 3
| Action | Where | What | Why (from the provider's docs) |
|---|---|---|---|
| Removed | root/properties/title | Removed minLength: 3 | minLength is not on OpenAI strict mode's documented list of supported keywords. |
| Removed | root/properties/title | Removed maxLength: 120 | maxLength is not on OpenAI strict mode's documented list of supported keywords. |
| Changed | root/properties/title | Moved removed constraints into the description | Anthropic's SDK guidance is to add each unsupported constraint to the field's description so the model still sees it. Validate the output yourself. |
| Removed | root/properties/customer/properties/site | Removed format: "uri" | "uri" is not in OpenAI strict mode's documented format list (date-time, time, date, duration, email, hostname, ipv4, ipv6, uuid). |
| Changed | root/properties/customer | Added additionalProperties: false | OpenAI requires additionalProperties: false on every object to opt into Structured Outputs. |
| Changed | root/properties/customer/properties/site | Optional property made nullable: type ["string","null"] | OpenAI requires every property in required; its docs say to mimic an optional field with a union type that includes null. |
| Changed | root/properties/customer | Listed 1 optional property in required: site | OpenAI: all fields or function parameters must be specified as required. |
| Changed | root | Added additionalProperties: false | OpenAI requires additionalProperties: false on every object to opt into Structured Outputs. |
| Changed | root/properties/assignee | Optional property made nullable: type ["string","null"] | OpenAI requires every property in required; its docs say to mimic an optional field with a union type that includes null. |
| Changed | root/properties/estimate_hours | Optional property made nullable: type ["number","null"] | OpenAI requires every property in required; its docs say to mimic an optional field with a union type that includes null. |
| Changed | root/properties/tags | Optional property made nullable: type ["array","null"] | OpenAI requires every property in required; its docs say to mimic an optional field with a union type that includes null. |
| Changed | root/properties/customer | Optional property made nullable: type ["object","null"] | OpenAI requires every property in required; its docs say to mimic an optional field with a union type that includes null. |
| Changed | root | Listed 4 optional properties in required: assignee, estimate_hours, tags, customer | OpenAI: all fields or function parameters must be specified as required. |
- OpenAI also supports a restricted subset on fine-tuned models (no string length, number bounds or array size keywords); this tool targets non-fine-tuned models.
- Structured output guarantees the shape, not the facts. Still validate the values the model returns, especially anything this tool moved into a description.
What does a structured-output schema need that a normal JSON Schema doesn't?
Each provider compiles your JSON Schema into a grammar that constrains the model's decoding, so each accepts only a subset of the language. This tool reads the schema, applies each provider's documented subset, and lists every edit with the reason.
OpenAI's strict mode needs additionalProperties: false on every object and every property listed in required. Optional fields become a type with null (for example ["string", "null"]). The root must be an object, not anyOf. allOf, not, if/then/else and the dependent keywords are not supported, and there are limits: 5,000 properties, 10 nesting levels, 120,000 characters of names and enum values, and 1,000 enum values.
Anthropic requires additionalProperties: false on objects, but doesn't require every property in required. It rejects numeric constraints (minimum, maximum, multipleOf), string length constraints, recursive schemas and external $ref, and allows array minItems of only 0 or 1. Strict tools are capped at 20 per request, with 24 optional parameters and 16 union-type parameters across all strict schemas.
Gemini accepts a subset: types, enum and format on strings, minimum and maximum on numbers, items, prefixItems and the array size keywords on arrays, plus properties, required and additionalProperties on objects. It strips minLength, maxLength, minProperties, maxProperties, uniqueItems and the contains keywords without an error, and rejects schemas it finds too large or deeply nested, without publishing a number.
OpenAI object: additionalProperties: false, required = every property
optional field → "type": ["string", "null"]
Anthropic object: additionalProperties: false, no numeric or length limits
Gemini: subset of keywords, unsupported ones strippedTo tidy or validate the JSON first, use the JSON formatter.
Schema tokens are billed as input, so see what a structured request costs with the LLM API cost calculator.
Which JSON Schema keywords does each provider support?
| Keyword | OpenAI strict | Anthropic | Gemini |
|---|---|---|---|
| additionalProperties | Must be false | Must be false | Boolean or schema |
| required | All properties required | Supported; optional allowed (24 max) | Supported |
| anyOf | Supported (not at the root) | Supported | Supported (shown in examples) |
| allOf / not / if-then-else | Not supported | allOf supported, not with $ref | Not listed |
| $ref / $defs | Supported, recursion allowed | Supported; no external or recursive refs | Supported for recursive types |
| minimum / maximum / multipleOf | Supported | Not supported | minimum, maximum only |
| minLength / maxLength | Not listed | Not supported | Stripped, not enforced |
| pattern | Supported | Simple patterns only | Not listed |
| format | 9 values (date-time … uuid) | 10 values (adds uri) | Listed for strings, values not listed |
| minItems / maxItems | Supported | minItems 0 or 1 only | Supported |
| const | Supported | Supported | Not listed |
How to make a JSON Schema work with structured outputs
- 1Paste a schema or a samplePaste the schema you have, or an example of the JSON you want back. A sample is turned into a schema first.
- 2Choose the providerPick OpenAI, Anthropic or Gemini. The checks panel also shows whether your input already fits the other two.
- 3Read the change tableEach row says what changed and why. Check rows are things the tool can't fix, such as a recursive schema for Anthropic.
- 4Copy the schema into your requestUse it as the response format (OpenAI), output_config.format or a strict tool's input_schema (Anthropic), or the response schema (Gemini), then validate the values you get back.
Frequently asked questions
Why does OpenAI strict mode make every field required?
What happens to minimum, maximum and minLength?
Can the schema be recursive?
Does the tool know Gemini's size limits?
Why did my oneOf turn into anyOf?
Is my schema sent to a server?
Sources
- OpenAI: Structured Outputs guide (supported schemas) (checked 11 Nov 2026)
- Anthropic: Structured outputs (JSON outputs and strict tool use) (checked 11 Nov 2026)
- Google Gemini API: Structured output (checked 11 Nov 2026)
Need a custom dev tool for your team?
We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.
Built by CountryDevs · No signup · No ads · We count visits, never what you enter