JSON Schema → TypeScript / Zod
Paste a JSON Schema (draft 7 or 2020-12) to project it into a TypeScript interface tree or a Zod v4 schema. Handles $ref, oneOf / anyOf, allOf, enum, and format hints. Runs locally in your browser.
Input
Paste a JSON Schema document — the top level should be an object with
type or another schema keyword.TypeScript interface tree. Nested objects become named types; arrays of objects unwrap; allOf becomes intersection; enum becomes literal union.
TypeScript output
Paste a JSON Schema to convert. Sample button on the right loads one to try.