JSON to Zod converter

Turn a sample payload into a Zod 4 schema. Enable format detection to add checks for values like emails and UUIDs.

Input

No key required

Result

Example

import { z } from "zod";

export const OwnerSchema = z.object({
  name: z.string(),
  email: z.email(),
});
export type Owner = z.infer<typeof OwnerSchema>;

export const CatSchema = z.object({
  id: z.int(),
  name: z.string(),
  born: z.iso.date(),
  owner: OwnerSchema,
});
export type Cat = z.infer<typeof CatSchema>;
Full response
{
  "to": "zod",
  "output": "import { z } from \"zod\";\n\nexport const OwnerSchema = z.object({\n  name: z.string(),\n  email: z.email(),\n});\nexport type Owner = z.infer<typeof OwnerSchema>;\n\nexport const CatSchema = z.object({\n  id: z.int(),\n  name: z.string(),\n  born: z.iso.date(),\n  owner: OwnerSchema,\n});\nexport type Cat = z.infer<typeof CatSchema>;\n"
}

Run with curl

Copy this command to run the request in your terminal. It updates as you edit the input.

For higher limits, get a free API key and add -H "Authorization: Bearer $KAMINEKO_API_KEY".

POST /v1/types
curl 'https://api.kamineko.dev/v1/types' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "sample": {
    "id": 7,
    "name": "Mochi",
    "born": "2021-04-01",
    "owner": {
      "name": "Ada",
      "email": "ada@example.com"
    }
  },
  "name": "Cat",
  "to": "zod"
}'

Use with MCP

Set KAMINEKO_API_KEY to your key and run this command to connect Claude Code. Try the types tool with this prompt.

Write a Zod schema that validates this webhook payload.
MCP https://api.kamineko.dev/mcp
claude mcp add --transport http kamineko \
  https://api.kamineko.dev/mcp \
  --header "Authorization: Bearer $KAMINEKO_API_KEY"