JSON to TypeScript converter
Infer TypeScript interfaces for nested objects and optional fields.
Turn a sample payload into a Zod 4 schema. Enable format detection to add checks for values like emails and UUIDs.
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>;
{
"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"
}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".
/v1/typescurl '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"
}'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.
https://api.kamineko.dev/mcpclaude mcp add --transport http kamineko \
https://api.kamineko.dev/mcp \
--header "Authorization: Bearer $KAMINEKO_API_KEY"Infer TypeScript interfaces for nested objects and optional fields.
Infer a draft 2020-12 schema from sample records.
See which lines changed between two versions of a file.
Compare two JSON documents and get a JSON Patch.