Skip to content
Mookat
Text & Developer Tools

JSON to TypeScript

Generate TypeScript interfaces and type aliases from JSON, including nested objects and arrays.

JSON stays in your browser. No schema or value is uploaded.

JSON input

Paste a JSON object or array. Interfaces are generated from the real keys, including nested objects and arrays of objects.

TypeScript


    

How types are inferred

Strings, numbers, booleans, and null map directly. Arrays of objects merge their keys; a key missing from one item becomes optional. Empty arrays become unknown[] because the element type cannot be inferred. Values that are sometimes null become a union with null.