JSON Schema to TypeScript and Zod
Generate TypeScript interfaces and Zod schemas from JSON Schema.
JSON Schema to TypeScript and Zod
How it works
- 1.
Paste your schema
Paste your JSON Schema into the left editor. Supports Draft-07 and Draft-2020-12 with $ref, oneOf/anyOf/allOf, enums, and patterns.
- 2.
Choose your target
Toggle between TypeScript interfaces (for static typing) and Zod schemas (for runtime validation). Both are generated from the same schema simultaneously.
- 3.
Copy the code
The generated code appears on the right with syntax highlighting. Copy it with one click — perfect for generating TS SDKs from OpenAPI specs.
FAQ
Which JSON Schema version is supported?+
Draft 7 with the most common features: type, properties, required, enum, anyOf, array/items, format.
Are $ref references resolved?+
Not in the current version. Dereference your schema before pasting it in.
Does it generate validators for formats like email?+
For Zod yes — z.string().email(), .uuid(), .url() and .datetime(). TypeScript output is purely structural.
Related tools
- DeveloperJWT Decoder and Encoder
Decode, verify and sign JSON Web Tokens. Everything runs locally in your browser.
- AIMarkdown to HTML Converter
Convert Markdown to clean HTML and strip AI artifacts.
- AILLM Token Counter and Cost Estimator
Count tokens for GPT-5, Claude 4.7 and Gemini 2.5. Estimate request cost in real time.