Output Schema Guesser

Guess the intended JSON schema from a natural-language output description.

Free JSON Schema guesser. Describe the structure you want in plain English, like an array of products with name, price, and review count, and get a draft JSON Schema definition instantly, no API key needed. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How does it infer field types?

It reads type hints in your text — words like string, number, integer, boolean, date, or email next to a field name — and falls back to string when no type is stated. You can edit the generated schema afterward.

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 integer when you mean whole numbers (counts, ids) and number for decimals (prices, scores) — the schema preserves the distinction.
  • The generated required array assumes every field is mandatory; delete entries for optional fields after copying.
  • Add an enum by listing values in parentheses: status (string): active, paused, archived.