JSON to TypeScript converter
Infer TypeScript interfaces for nested objects and optional fields.
Paste sample records to infer a draft 2020-12 JSON Schema. Fields that appear in every record become required.
Example
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Cat",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"born": {
"type": "string",
"format": "date"
},
"owner": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
},
"required": [
"name",
"email"
]
}
},
"required": [
"id",
"name",
"born",
"owner"
]
}
{
"to": "json-schema",
"output": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"Cat\",\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"integer\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"born\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"owner\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\"\n }\n },\n \"required\": [\n \"name\",\n \"email\"\n ]\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"born\",\n \"owner\"\n ]\n}\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": "json-schema"
}'Set KAMINEKO_API_KEY to your key and run this command to connect Claude Code. Try the types tool with this prompt.
Write a JSON Schema for this config file.
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.
Generate a Zod 4 schema that recognizes emails, URLs, and dates.
See which lines changed between two versions of a file.
Compare two JSON documents and get a JSON Patch.