Schemas are inferred from the sample's shape only — arrays use the type of their first element, and fields present in other array items or absent here won't be reflected. Review before using in production.
About JSON to Zod / Pydantic
Structured LLM outputs (OpenAI's response format, function/tool calling, Instructor, LangChain output parsers) need a schema to validate against. Writing that schema by hand from an example payload is repetitive — this tool infers a Zod schema or Pydantic model directly from a sample JSON response, including nested objects and arrays.
Key Features
Generates a Zod schema with inferred TypeScript types, or a Pydantic model with nested classes.
Handles nested objects and arrays, converting keys to idiomatic snake_case for Python with alias mapping preserved.
100% client-side — your sample JSON never leaves the browser.