SchemaCraftby

JSON to OpenAI structured output converter

Paste JSON, JSON5, a Python dict or NDJSON and get response_format for the Chat Completions and Responses APIs. The model is inferred from your samples, drawn as a pinout so you can check it, and written out ready to copy. Nothing leaves your browser.

Open the workbench with OPENAI-STRICT

What you get

  • A response_format block with type json_schema and strict: true.
  • Every property listed in required and additionalProperties: false on every object.
  • Optional fields as anyOf with null, the form strict mode accepts.
  • Formats such as email and date-time moved into descriptions, since strict mode rejects format.

Example: a flight booking payload

The sample below has nested passengers, an itinerary and a payment. This is the OpenAI structured output SchemaCraft writes for it, with strict mode on.

booking.json · input

{
"booking_id": "bk_9f4c3a12-8e1b-4f72-9852-c62d08a5f331",
"pnr": "NOR742",
"status": "CONFIRMED",
"created_at": "2026-08-21T15:30:00Z",
"passengers": [
{
"passenger_id": "pax_01",
"first_name": "Sarah",
"last_name": "Connor",
"email": "sarah.connor@skyline.org",
"loyalty_tier": "PLATINUM",
"checked_bags": 2,
"special_meal": "VEGAN"
},
{
"passenger_id": "pax_02",
"first_name": "John",
"last_name": "Connor",
"email": "john.connor@skyline.org",
"loyalty_tier": "GOLD",
"checked_bags": 1,
"special_meal": null
}
],
"itinerary": {
"flight_number": "NA-204",
"origin": "SFO",
"destination": "HND",
"departure_time": "2026-09-15T11:45:00Z",
"arrival_time": "2026-09-16T15:30:00Z",
"duration_minutes": 645,
"cabin_class": "BUSINESS"
},
"payment": {
"amount": 3420.5,
"currency": "USD",
"is_settled": true,
"receipt_url": "https://pay.norai.dev/receipts/rec_891274"
}
}

FlightBookingRequest.json · OPENAI-STRICT

{
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "FlightBookingRequest",
"strict": true,
"schema": {
"type": "object",
"properties": {
"booking_id": {
"type": "string"
},
"pnr": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string",
"description": "ISO 8601 datetime"
},
"passengers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"passenger_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string",
"description": "Email address"
},
"loyalty_tier": {
"type": "string",
"enum": [
"PLATINUM",
"GOLD"
]
},
"checked_bags": {
"type": "integer"
},
"special_meal": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"required": [
"passenger_id",
"first_name",
"last_name",
"email",
"loyalty_tier",
"checked_bags",
"special_meal"
]
}
},
"itinerary": {
"type": "object",
"properties": {
"flight_number": {
"type": "string"
},
"origin": {
"type": "string"
},
"destination": {
"type": "string"
},
"departure_time": {
"type": "string",
"description": "ISO 8601 datetime"
},
"arrival_time": {
"type": "string",
"description": "ISO 8601 datetime"
},
"duration_minutes": {
"type": "integer"
},
"cabin_class": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"flight_number",
"origin",
"destination",
"departure_time",
"arrival_time",
"duration_minutes",
"cabin_class"
]
},
"payment": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"is_settled": {
"type": "boolean"
},
"receipt_url": {
"type": "string",
"description": "URL"
}
},
"additionalProperties": false,
"required": [
"amount",
"currency",
"is_settled",
"receipt_url"
]
}
},
"additionalProperties": false,
"required": [
"booking_id",
"pnr",
"status",
"created_at",
"passengers",
"itinerary",
"payment"
]
}
}
}
}

Made by Nor AI

SchemaCraft is a free tool from Nor AI Technologies, an engineering studio in Ghazipur, Uttar Pradesh. We build custom AI, web and 3D software that runs in your own infrastructure, and you keep the code.

Wiring structured output or tool calling into your product, or need a typed data layer around an LLM pipeline? You talk to the engineers who write the code.