DashboardSign inStart your trial

JSON Schema Generator for LLM Structured Outputs

Build the schema visually, or paste example JSON and let the tool infer it. Copy provider-ready snippets for OpenAI structured outputs, Claude tool use, Gemini structured output, and Zod.

Build it field by field

Name the fields you want the AI to return. Descriptions matter: they tell the model what to extract.

Start from example JSON

Paste a sample of the output you want and we'll infer the schema.

Runs entirely in your browser. Nothing is uploaded.

02. Still deciding

Frequently asked questions

What is a JSON schema for LLM structured outputs?

A JSON schema describes the exact shape of the data you want a language model to return: field names, types, which fields are required, and what each field means. OpenAI, Claude, and Gemini all accept a schema alongside your prompt and constrain the model's response to match it, which turns free-form text generation into reliable, parseable data extraction.

Why does OpenAI strict mode change my schema?

OpenAI's structured outputs strict mode requires additionalProperties: false on every object and every property listed in the required array. Because of that, a field can't simply be left out of required to make it optional. Instead its type becomes a union with null, like ["string", "null"], and the model returns null when the field doesn't apply. This tool applies those transforms automatically on the OpenAI tab.

How do OpenAI, Claude, and Gemini structured output formats differ?

OpenAI takes a response_format block with a strict JSON schema and the transforms strict mode demands. Claude takes the schema as a tool definition's input_schema and treats optional fields normally: they're omitted from required. Gemini accepts standard JSON Schema through the responseJsonSchema field of generationConfig. The schema you build here is converted to each provider's dialect automatically.

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

Toggle the field to optional in the builder. On the OpenAI tab the field stays in the required array (strict mode demands it) but its type becomes a null union, so the model returns null instead of omitting the key. On the Claude and Gemini tabs the same field is simply left out of required.

Can I generate a Zod schema from example JSON?

Yes. Paste a sample of the JSON you want on the builder's empty state and the tool infers field names, types, optionality, and nesting, including merging the elements of arrays. Then switch to the Zod tab for z.object() code with .describe() carrying your field descriptions, ready for the Vercel AI SDK's generateObject or streamObject.

Is my schema or pasted JSON sent to a server?

No. Everything runs in your browser. The share link encodes the schema in the URL fragment (the part after #), which browsers never send to the server.

Skip the schema-writing entirely.

In Rills, AI steps generate the schema for you: describe what you want, approve the result. Risky steps pause for a swipe on your phone, and the waiting costs $0.

14-DAY TRIAL · NO CREDIT CARD · APPROVALS ARE FREE