DevFlow logoDevFlow
ToolsPipelinesExploreDocsPricing
⌘F
DashboardPipeline BuilderAnalytics

Try Pro — Free 7 days

No credit card required

LLM Structured Output JSON Schema Generator — OpenAI, Claude, Gemini

How to LLM JSON Schema Generator Online

  1. 1

    Paste a JSON example into the input area, or switch to DSL mode to describe your schema.

  2. 2

    Select your target LLM provider (OpenAI, Anthropic, Gemini, Ollama) or "None" for raw JSON Schema.

  3. 3

    Choose the JSON Schema draft version (2020-12 recommended for OpenAI structured outputs).

  4. 4

    Configure options: root schema name, require all properties, strict mode, auto-descriptions.

  5. 5

    Click Generate or press ⌘↵ to create your provider-specific schema.

  6. 6

    Copy the generated schema and paste it into your LLM API call.

LLM JSON Schema Generator Features

  • ✓

    Generate JSON Schema optimized for LLM structured outputs with provider-specific wrappers.

  • ✓

    OpenAI support: generates response_format with json_schema type for GPT-4o and later.

  • ✓

    Anthropic support: generates tool use input_schema for Claude models.

  • ✓

    Gemini support: generates function calling parameters for Gemini models.

  • ✓

    Ollama support: generates JSON format schemas for local LLM inference.

  • ✓

    Draft version selection: Draft 7, Draft 2019-09, and Draft 2020-12.

  • ✓

    Require all properties: forces every property into the required array for guaranteed field presence.

  • ✓

    Strict mode: sets additionalProperties: false on all objects to prevent LLM hallucinations.

  • ✓

    Auto-descriptions: auto-generates description fields from key names for better LLM context.

  • ✓

    Array item detection: properly extracts nested array element types as named definitions.

  • ✓

    DSL mode: describe schemas with simple TypeScript-like syntax instead of JSON examples.

  • ✓

    Stats display: shows property count, nesting depth, and required field count.

  • ✓

    Shareable URLs: gzip-compress your input and settings into a shareable link.

  • ✓

    Works entirely in your browser — your data never leaves your machine.

Supported SQL Dialects

The LLM JSON Schema Generator supports 5 SQL dialects. Select the right dialect for accurate formatting and keyword recognition.

OpenAI
response_format with json_schema type for GPT-4o and later structured outputs.
Anthropic
Tool use input_schema for Claude models with structured output support.
Gemini
Function calling parameters for Gemini 1.5 and later models.
Ollama
JSON format mode for local LLM inference with schema constraints.
Raw JSON Schema
Standard JSON Schema for any LLM or tool that accepts JSON Schema directly.

Frequently Asked Questions

How do I use this with OpenAI structured outputs?
Select "OpenAI" as the provider and choose Draft 2020-12. The tool generates a response_format object with the json_schema wrapper. Paste the output into your API call as response_format: { type: "json_schema", json_schema: { name: "YourSchema", schema: {...}, strict: true } }.
What's the difference between JSON mode and JSON Schema mode in OpenAI?
JSON mode (response_format: { type: 'json' }) lets the model return any valid JSON but doesn't enforce structure. JSON Schema mode (response_format: { type: 'json_schema', json_schema: {...} }) guarantees the model outputs JSON matching your exact schema - including required fields and types.
Which JSON Schema draft should I use?
For OpenAI, Anthropic, and Gemini, use Draft 2020-12 as it supports $defs for clean schema organization. Draft 2019-09 is useful for intermediate compatibility. Draft 7 is for legacy systems.
How does Anthropic structured output work?
Anthropic Claude models support structured output via tool use. Generate a schema with the Anthropic provider, then use the output as the input_schema in your tool definitions. Claude will output JSON matching the schema.
Does this work with Ollama / local LLMs?
Yes. Select "Ollama" as the provider and use the generated schema with Ollama JSON mode. The wrapper includes format: "json" and the schema for compatible models like those with function calling support.
Why should I set strict mode?
Strict mode sets additionalProperties: false on all objects, preventing the LLM from inventing fields not defined in your schema. This is critical for production applications where downstream code expects an exact shape.
Is my data safe?
Yes, all generation runs entirely in your browser using JavaScript. No JSON data is ever transmitted to a server, making this tool safe for sensitive data.
What is the DSL mode?
DSL mode lets you describe schemas using a simple TypeScript-like syntax: { name: string, age: number, tags: string[] }. This is useful when you want to define a schema structure without providing a full JSON example.

Related Developer Tools

  • JSON to TypeScript & Schema GeneratorGenerate TypeScript interfaces, Zod schemas, and Valibot schemas from JSON.
  • JSON to Zod SchemaConvert JSON to Zod schema definitions for runtime validation.
  • JSON to TypeScriptConvert JSON to TypeScript interfaces or type aliases instantly.
  • JSON to Pydantic ModelConvert JSON to Pydantic v2 BaseModel classes for Python and FastAPI.
  • AI Prompt BuilderBuild structured LLM prompts with per-section token counting, variable injection, and provider-aware exports for OpenAI, Anthropic, and Google.
  • MCP Schema ValidatorValidate, format, and debug MCP (Model Context Protocol) server schemas.