Load JSON Schema
Paste or drop a Draft 2020-12 or Draft-07 .schema.json file.
Preserve validation constraints, .describe() JSDoc hints, enums, and $ref definitions when compiling JSON Schema into Zod v4 locally.
Select .schema.json
preserves enums, numeric bounds, minLength & .describe().json
Zero upload limits · Runs in browser RAM
Preserves enums & bounds
{
"type": "object",
"required": ["invoiceId", "total"],
"properties": {
"invoiceId": { "type": "string", "minLength": 4 },
"total": { "type": "number", "minimum": 0 },
"status": { "type": "string", "enum": ["draft", "paid", "void"] }
},
"additionalProperties": false
}Zod v4 schema preserving enums, min/max & required rules| Property | Source: JSON Schema | Target: Zod |
|---|---|---|
| File extension | .schema.json | .ts |
| MIME type | application/schema+json | text/typescript |
| Structure type | Typed Schema | Typed Schema |
| Encoding | UTF-8 Text | UTF-8 Text |
| Nesting support | Yes | Yes |
| LLM token efficiency | Medium | Medium |
| Schema / typed | Yes | Yes |
| Best for | Cross-language API payload contracts, OpenAI/Anthropic Structured Outputs, form validation, and AJV verification. | TypeScript runtime parsing, tRPC/Next.js form validation, AI SDK structured outputs, and MCP server tool input schemas. |
Compile JSON Schema ($defs, $ref, enum, minimum, minLength, description) into idiomatic Zod v4 TypeScript code.
Paste or drop a Draft 2020-12 or Draft-07 .schema.json file.
Set schema name, preserve .describe() annotations, and include z.infer type export.
Save the generated TypeScript validator with all constraints intact.
Compile JSON Schema into strict TypeScript .d.ts interfaces with union literals, optional ? props, and JSDoc comments.
Validate payloads against Draft 2020-12 or Draft-07 schemas locally with AJV and inspect exact JSON Pointer error paths.
Turn OpenAPI YAML/JSON specs into Model Context Protocol (MCP) TypeScript tool definitions and Zod v4 input schemas locally.
enum and minimum/maximum bounds converted?Yes. Enums map to z.enum([...]) and numeric/string bounds map to .min(), .max(), and length constraints.
$defs and $ref pointers?Yes. Local #/$defs/... and #/definitions/... references resolve automatically inside the Unified Type IR.
anyOf and oneOf unions?Yes. Nullable and multi-branch unions map to .nullable() or z.union([...]).