Developer·Updated 2026-04-21

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. 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. 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. 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