# JSON to Types

Turn any JSON into TypeScript types and a Zod schema.

**Why delegate it:** Typing from the first array element produces types that reject the rest of the data, and null is routinely conflated with absent. Also far cheaper in output tokens than writing the types inline for a large payload.

Site: https://json-to-types-seven.vercel.app

## Tools

### `json_to_types` — JSON to TypeScript and Zod

Convert a JSON sample into TypeScript interfaces and a matching Zod schema. Merges EVERY array element into a union rather than typing from the first, keeps optional and nullable distinct, and emits unknown with a warning for empty containers instead of inventing a shape. Read the warnings before trusting the output.

Direct endpoint: `https://json-to-types-seven.vercel.app/api/v1/convert`

---

Via the aggregator: `https://gumballtools.com/api/mcp`
Direct: `https://json-to-types-seven.vercel.app/api/mcp`
