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

Paste a schema to fix it, or a sample such as an API response to infer one. Nothing leaves your browser.

The result shows what changed for this provider and whether the original already passes the other two.

Keeps rules like minimum 0 visible to the model after the API rejects the keyword.

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
Every change, in the order the walker met it
ActionWhereWhatWhy (from the provider's docs)
Removedroot/properties/titleRemoved minLength: 3minLength is not on OpenAI strict mode's documented list of supported keywords.
Removedroot/properties/titleRemoved maxLength: 120maxLength is not on OpenAI strict mode's documented list of supported keywords.
Changedroot/properties/titleMoved removed constraints into the descriptionAnthropic's SDK guidance is to add each unsupported constraint to the field's description so the model still sees it. Validate the output yourself.
Removedroot/properties/customer/properties/siteRemoved format: "uri""uri" is not in OpenAI strict mode's documented format list (date-time, time, date, duration, email, hostname, ipv4, ipv6, uuid).
Changedroot/properties/customerAdded additionalProperties: falseOpenAI requires additionalProperties: false on every object to opt into Structured Outputs.
Changedroot/properties/customer/properties/siteOptional 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.
Changedroot/properties/customerListed 1 optional property in required: siteOpenAI: all fields or function parameters must be specified as required.
ChangedrootAdded additionalProperties: falseOpenAI requires additionalProperties: false on every object to opt into Structured Outputs.
Changedroot/properties/assigneeOptional 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.
Changedroot/properties/estimate_hoursOptional 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.
Changedroot/properties/tagsOptional 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.
Changedroot/properties/customerOptional 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.
ChangedrootListed 4 optional properties in required: assignee, estimate_hours, tags, customerOpenAI: 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 stripped

To 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?

From each provider's structured-output documentation (read 2026-11-11)
KeywordOpenAI strictAnthropicGemini
additionalPropertiesMust be falseMust be falseBoolean or schema
requiredAll properties requiredSupported; optional allowed (24 max)Supported
anyOfSupported (not at the root)SupportedSupported (shown in examples)
allOf / not / if-then-elseNot supportedallOf supported, not with $refNot listed
$ref / $defsSupported, recursion allowedSupported; no external or recursive refsSupported for recursive types
minimum / maximum / multipleOfSupportedNot supportedminimum, maximum only
minLength / maxLengthNot listedNot supportedStripped, not enforced
patternSupportedSimple patterns onlyNot listed
format9 values (date-time … uuid)10 values (adds uri)Listed for strings, values not listed
minItems / maxItemsSupportedminItems 0 or 1 onlySupported
constSupportedSupportedNot listed

How to make a JSON Schema work with structured outputs

  1. 1
    Paste 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.
  2. 2
    Choose the providerPick OpenAI, Anthropic or Gemini. The checks panel also shows whether your input already fits the other two.
  3. 3
    Read 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.
  4. 4
    Copy 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?
Strict mode's docs say all fields or function parameters must be specified as required. To keep a field optional, give it a union type with null, such as ["string", "null"], and let the model return null. This tool does that for every optional property.
What happens to minimum, maximum and minLength?
It depends on the provider. OpenAI supports minimum and maximum but its docs don't list minLength or maxLength. Anthropic rejects numeric and string-length constraints with a 400 error. Gemini strips minLength and maxLength silently, so they don't enforce anything. This tool removes what the target doesn't document and, if you ask, appends the rule to the field's description.
Can the schema be recursive?
OpenAI documents recursion through $ref, for example a node pointing back at itself through anyOf with null. Anthropic lists recursive schemas as not supported. Gemini supports recursive $ref but advises making recursive properties optional or nullable.
Does the tool know Gemini's size limits?
No, because Gemini's documentation doesn't give numbers. It says the compiled schema limits total states, branching paths and nesting depth, and that very large or deeply nested schemas may be rejected with a 400 error. The tool only warns when a schema is large.
Why did my oneOf turn into anyOf?
None of the three providers documents oneOf for structured outputs; each documents anyOf. oneOf requires exactly one matching branch, while anyOf allows one or more, so check that your branches don't overlap.
Is my schema sent to a server?
No. The conversion runs in your browser. Anthropic's docs do say its API caches the compiled schema for up to 24 hours once you use it, so keep personal data out of property names, enums and patterns.

Sources

Related tools

See all 135 free tools

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