JSON to TypeScript Converter
Paste a JSON object and instantly get clean TypeScript interfaces — with optional fields, union types and smart naming.
JSON
TypeScript
Generate TypeScript types from any JSON
JSONStruct infers a structural type model from your JSON payload — an API response, a config file, a webhook body — and renders it as ready-to-use TypeScript. Array elements are merged into a single shape: fields missing from some elements become optional (archived?: boolean), and fields with diverging types become unions (deadline: string | null). Identical object shapes are deduplicated into one shared interface, and array element types are named by singularizing their key (users becomes User).
Private and free — your JSON never leaves the browser
Everything runs client-side. Nothing you paste is uploaded, logged or stored, which makes JSONStruct safe to use with production payloads. Tune the output with interface or type declarations, export and readonly modifiers, semicolon style and how optional fields are rendered, then copy the result or download it as a .ts file.