LLM JSON Schema Generator

Build a Schema Once • Get OpenAI & Anthropic Formats

OpenAI strict mode has a specific quirk: every field must appear in required, and fields you want optional must instead use a nullable type like ["string", "null"] — omitting a field from required isn't allowed. This tool handles that automatically for the OpenAI outputs below. Anthropic's input_schema doesn't have this restriction and uses standard JSON Schema semantics for optional fields.
Schema Name & Description
Letters, numbers, underscores, hyphens only.
Fields
Generated Output
About
Provider Differences
Contact

About the JSON Schema Generator

This tool builds a JSON Schema from a simple field list — name, type, description, and whether each field is required — and formats it four ways: as a standalone JSON Schema, as an OpenAI Structured Outputs response_format block, as an OpenAI function-calling tool definition, and as an Anthropic tool-use definition. Getting an LLM to reliably return structured JSON depends on matching each provider's exact expected shape, which differs more than most people expect — this tool handles those differences (including OpenAI's specific requirement around optional fields) so you don't have to hand-edit JSON to match each provider's quirks. Everything is generated locally in your browser.