Skip to the payload editor
SchemaCraftby
Manufacturer
Nor AI Technologies
Part
SchemaCraft
Price
Free, no sign-in
Contact
Talk to an engineer

JSON to Zod, Pydantic, TypeScript and LLM tool schemas

Paste a payload, read its pinout, copy the package you need. Runs in this tab; nothing is uploaded.

Paste a payload

JSONJSON5Python dictNDJSON

Inferred part

4 parts · 25 pins

Root of the payload
U1FlightBookingRequest
1273645
  • Required
  • Optional
  • Nullable
Pin functions · U1
PinNameTypeModeSample
1booking_idstringRequiredbk_9f4c3a12-8e1b-4f72-9852-c62d08a5f331
2pnrstringRequiredNOR742
3statusstringRequiredCONFIRMED
4created_atdatetimeRequired2026-08-21T15:30:00Z
5passengersU2[]Required—
6itineraryU3Required—
7paymentU4Required—

Generated schema

LLM tools
Python
TypeScript
Systems

FlightBookingRequest.openai.json

{
"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"
]
}
}
}
}

Parsed as JSON25 fields · 4 models · depth 4OPENAI-STRICT · strict on

One payload, eleven packages

Converters usually emit one target, and schema builders make you type each field by hand. SchemaCraft infers the model once and writes it for every place it has to go: the LLM provider, your Python service and your TypeScript client.

LLM tools

Python

TypeScript

Systems

What the inference reads from your samples

Every rule shows up on the pinout before you copy anything, and each one can be switched off under Inference rules. IDs and names stay strings: a value only becomes an enum when it looks like a label and repeats.

DetectedWhenSampleZodPydantic
UUID8-4-4-4-12 hex550e8400-e29b-41d4-…z.string().uuid()UUID
Emaillocal@domain.tldada@example.comz.string().email()EmailStr
URLhttp or httpshttps://pay.example/r/891z.string().url()HttpUrl
Date-timeISO 8601 with time2026-08-21T15:30:00Zz.string().datetime()datetime
DateISO 8601 date2026-08-21z.string().date()date
IP addressIPv4 or IPv610.0.0.1z.string().ip()IPvAnyAddress
Enumrepeated short labelsGOLD, PLATINUMz.enum(["GOLD", …])Literal["GOLD", …]
Integerwhole numbers only645z.number().int()int
Optionalkey missing in a sample{ } vs { "x": 1 }.optional()X | None = None
Nullablekey present as null"special_meal": null.nullable()X | None

Against the usual ways to get a schema

CapabilitySchemaCraftSingle-target convertersManual schema buildersAsking an LLM to write it
Takes JSON5, Python dicts and NDJSONYesUsually JSON onlyNo inputYes
Many outputs from one paste11 packagesOneOne or a fewOne per prompt
Provider strict rules appliedYes, on every objectRarelyBy handOften missed
Shows what it inferredPinout and pin tableNoYou define itNo
Same output every timeYesYesYesNo
Check a payload against itTest benchVariesVariesNo
Payload stays on your machineYesVariesVariesNo, it is sent to the model

Categories, not named products: tools in each group vary.

Questions

Is my payload uploaded anywhere?

No. Parsing, inference and every generator run in a Web Worker inside your browser tab. The page makes no request with your data, so it is safe for internal payloads.

What input does SchemaCraft accept?

Standard JSON, JSON5 (comments, trailing commas, single quotes, unquoted keys), Python dict literals with True, False and None, and NDJSON with one record per line. Many records are merged into one model.

Why does OpenAI strict mode need every field in required?

Structured Outputs with strict: true only accepts schemas where every object lists all of its properties in required and sets additionalProperties: false. A field that can be absent is written as a union with null instead. The OPENAI-STRICT package applies those rules for you, on every nested object.

What is the difference between optional and nullable?

Optional means a key was missing from at least one sample. Nullable means the key was present with the value null. SchemaCraft keeps them apart: Zod gets .optional() or .nullable(), TypeScript gets ? or | null, and the pin table shows which is which.

When does a string become an enum?

Only when the values look like labels (GOLD, in_transit) and repeat across samples, up to the limit you set in Inference rules. IDs, names and free text stay strings. You can turn enum detection off.

Which string formats are detected?

UUIDs, emails, URLs, ISO 8601 date-times and dates, and IPv4 and IPv6 addresses. Each package writes them its own way: z.string().email() in Zod, EmailStr in Pydantic, format: email in JSON Schema, and a description in OpenAI strict, which rejects format.

Can I check a payload against the generated schema?

Yes. The Test bench validates any payload you paste against the inferred schema and lists each missing field, wrong type and unexpected key with its path. Mock data gives you a valid sample to start from.

Does it emit Pydantic v1 as well as v2?

Yes. v2 uses model_config = ConfigDict(extra="forbid") under strict mode; v1 uses a nested Config class. You can also pick X | None or Optional[X].

Do I need an account?

No. Pasting, every package, copying, downloading, the test bench and mock data are free without an account. Only the ZIP export of all packages at once asks you to sign in.

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.