Turn a plain-English description into a JSON Schema
When you want an LLM to return structured output, you need a JSON Schema — but
hand-writing one for every new shape is tedious. This tool reads a natural
language description of the structure you want and drafts a JSON Schema
(draft 2020-12) with the right fields, types, and a required list. No API key,
no network call — it parses your text locally and instantly.
Why you need a JSON Schema for LLM structured output
Modern LLM APIs — including OpenAI’s response_format: {type: "json_schema"} and
Anthropic’s tool-use definitions — require a JSON Schema to constrain structured
output. Without a schema, even a model that reliably returns JSON will occasionally
produce different field names, unexpected types, or missing keys that break
downstream code. A schema enforces a contract: the model must match the shape or
the API returns an error.
Writing a schema from scratch means remembering the draft-2020-12 syntax:
properties, type, items for arrays, required as a separate array, and so on.
This tool handles that boilerplate so you can describe the shape in plain English
and get a valid starting schema immediately.
How the guesser works
The parser scans your description for field names and nearby type hints —
words like string, number, integer, boolean, date, or email. Each
detected field becomes a property with the inferred type (defaulting to string
when no hint is present). You choose whether the root is a single object or an
array of objects; for arrays the fields go under items. Field names are
normalised to clean keys, and every property is listed as required by default so
your structured-output call is strict. The result is a ready-to-edit schema, not a
final answer — tweak types and required-ness to taste.
Example
Input description:
an array of products with name (string), price (number),
in stock (boolean), and category (string)
Generated schema (draft 2020-12):
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" },
"in_stock": { "type": "boolean" },
"category": { "type": "string" }
},
"required": ["name", "price", "in_stock", "category"]
}
}
Paste this into your API call’s json_schema parameter and remove fields from
required that are optional.
Tips and examples
- Write one field per line with an explicit type:
title: string,price: number,published: boolean. Clear lists parse far better than prose. - Mention “array of” or “list of” at the start to get an array root automatically.
- Use
integerwhen you mean whole numbers (counts, ids) andnumberfor decimals (prices, scores) — the schema preserves the distinction. - The generated
requiredarray assumes every field is mandatory; delete entries for optional fields after copying. - Add an
enumby listing values in parentheses:status (string): active, paused, archived.