JSON to Types

Paste JSON, get TypeScript, Zod, Pydantic, dataclass, and Go types.

Runs in browser

Use from your agent

Streamable HTTP at https://benchline.fabwaseem.com/mcp. No key. The tool name is convert_json_to_types.

mcp.jsonjson
1{
2 "mcpServers": {
3 "benchline": {
4 "url": "https://benchline.fabwaseem.com/mcp"
5 }
6 }
7}
tools/calljson
1{
2 "jsonrpc": "2.0",
3 "id": 1,
4 "method": "tools/call",
5 "params": {
6 "name": "convert_json_to_types",
7 "arguments": {
8 "json": "{}",
9 "rootName": "Root",
10 "targets": [
11 "typescript"
12 ]
13 }
14 }
15}

How it works

Free JSON to type converter. Paste a JSON document and generate TypeScript interfaces, Zod schemas, Python Pydantic models or dataclasses, and Go structs. Optional fields are detected across array items, nulls become nullable, and nested objects get their own named types.

  1. 01

    Paste your JSON

    Drop a JSON document into the editor, upload a .json file, or start from the sample.

  2. 02

    Pick the targets

    Toggle TypeScript, Zod, Pydantic, dataclass, and Go. Set the root type name.

  3. 03

    Copy the output

    Each target gets its own tab with copy and download buttons.

FAQ