JSON Schema to Zod and TypeScript
Generate Zod schemas or TypeScript types from a JSON Schema.
Loading the tool…
What it does, how to use it, and questions
What it does
JSON Schema describes types; many teams want Zod or TypeScript instead. This generator covers object, array, string, number, integer, boolean, enum and shallow $defs references.
Unsupported keywords are emitted as comments so you can see what was skipped.
How to use it
- Paste a JSON Schema.
- Choose Zod or TypeScript.
- Copy the output and read any unsupported-keyword comments.
Things to watch for
- Remote
$refURLs are not fetched. - Conditionals (
if/then/else) are not expanded.
Questions
- Which draft is supported?
- Common keywords shared across drafts 4–2020-12. Draft-specific formats may be skipped.
- Can it generate from OpenAPI?
- Paste the schema object (or convert the OpenAPI document first). Full OpenAPI codegen is out of scope.
- Is Zod the only runtime schema?
- Zod is offered because it is common in TypeScript apps. The TypeScript mode emits types only.
- Is the schema uploaded?
- No.