Convert a JSON Schema for OpenAI structured outputs, Anthropic or Gemini

Paste a JSON Schema. Get a version the chosen API accepts, a list of every change by JSON Pointer path, and warnings for rules that cannot be kept.

How it works

  1. Paste your JSON Schema
  2. Choose OpenAI, Anthropic or Gemini
  3. Copy the converted schema and read the change list

What OpenAI strict mode needs

To use a JSON Schema with OpenAI strict mode, every object must set additionalProperties to false, every property must be listed in required, and an optional property is written as a type that also allows null. The tool applies those three rules to every object it finds, including objects inside arrays, anyOf branches and $defs. Take {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer","minimum":0}},"required":["name"]}. For OpenAI it returns age as ["integer","null"], required as ["name","age"] and additionalProperties false, which is 3 changes. An optional enum gets null added to its value list, and an optional $ref becomes an anyOf of the reference and null. As of October 2026 OpenAI lists these types: string, number, boolean, integer, object, array, enum and anyOf. It names allOf, not, dependentRequired, dependentSchemas, if, then and else as unsupported, and the tool removes them and lists each one.

Anthropic and Gemini follow different rules

Anthropic does not ask for every property to be required, so optional properties stay optional. It does require additionalProperties to be false, and it accepts no minimum, maximum, multipleOf, minLength or maxLength, and no minItems other than 0 or 1. The same age example becomes {"type":"integer"} with the note minimum 0 written into its description, if you keep that switch on. Anthropic also lists a format set (date-time, time, date, duration, email, hostname, uri, ipv4, ipv6, uuid), allows allOf with limits, and does not support recursive schemas. Gemini has two shapes. The JSON Schema one, used by responseJsonSchema and parametersJsonSchema, keeps type, enum, minimum, maximum, minItems, maxItems, anyOf, oneOf, $ref and $defs and drops pattern and length limits, and turns const into a one-value enum. The older OpenAPI 3.0 subset behind responseSchema has no $ref, so the tool inlines local references, writes types in upper case such as OBJECT, and turns ["string","null"] into type STRING with nullable true.

Limits the tool checks but cannot fix

Some limits cannot be repaired by rewriting. For OpenAI the tool counts object properties, levels of nesting, enum values and the characters in names and enum values, and warns above 5,000 properties, 10 levels, 1,000 enum values or 120,000 characters. For Anthropic it warns when one schema has more than 24 optional properties or 16 union-typed properties, which the docs count across the whole request together with a limit of 20 strict tools. A schema whose root is not an object, a free-form map that needs additionalProperties other than false, and a recursive schema for Anthropic are reported as warnings, because no safe rewrite exists. When a constraint is removed, the change list names the keyword, its value and its path, so nothing disappears without a record.

What it does not do

The tool rewrites the shape of a schema. It does not call any API, so it cannot confirm that a provider accepts the result. Vendors change these lists, so treat the output as a starting point and keep the vendor's own error message in mind when a request is rejected. A oneOf becomes anyOf for OpenAI and Anthropic, which turns exactly one into at least one, and the change list says so. The OpenAI docs leave minLength and maxLength out of the supported list for most models while naming them as unsupported for fine-tuned models, so the tool keeps them and you should test them. Titles, defaults and examples are removed for OpenAI because they are not on its list, and the change list marks them as annotations.

Frequently asked questions

How do I make a JSON Schema work with OpenAI strict mode?

Set additionalProperties to false on every object, list every property in required, and give each formerly optional property a type that includes null, for example ["string","null"]. Paste the schema here with OpenAI strict selected and the converted version appears with each change listed by path.

How do I keep a field optional in OpenAI strict mode?

Strict mode requires every property in required, so optionality is written as a nullable type. A field like "nickname": {"type":"string"} becomes {"type":["string","null"]} and is listed in required. The model then returns null when there is no value.

Why were minimum and maxLength removed for Anthropic?

Anthropic's structured outputs reject numeric limits such as minimum, maximum and multipleOf, string limits minLength and maxLength, and array limits beyond minItems of 0 or 1. The tool removes each one, names its path, and can copy the rule into the description as text, for example minimum 0, so the model still sees it. Your own code has to enforce the limit.

Should I use Gemini responseSchema or responseJsonSchema?

The Gemini API reference marks responseSchema as deprecated in favour of responseFormat, and responseJsonSchema accepts JSON Schema directly. Pick Gemini JSON Schema for new code. Pick Gemini OpenAPI only for code that still sends responseSchema, which has no $ref and uses types such as STRING and OBJECT.

Does Anthropic need every property to be required?

No. Optional properties stay optional, but they count toward a limit of 24 optional parameters across all strict schemas in one request. Anthropic does need additionalProperties to be false on each object, which the tool adds.

Is my schema uploaded?

No. It is processed in your browser, in this tab, and no server receives it. Your choices of target and output layout are saved in this browser, the schema is not.