What this tool does
JSON to TypeScript turns a JSON sample into ready-to-use TypeScript. It infers the type of every field, generates a named interface for each nested object, and handles arrays — including arrays of objects, where it merges keys and marks the optional ones.
How it works
Your JSON is parsed and walked recursively. Objects become interfaces (or type aliases), arrays become element-typed arrays, and primitives map to their TypeScript equivalents. Non-identifier keys are quoted so the result always compiles, and you control the output style with the export, semicolon, and unknown-over-any toggles.
Privacy
Everything runs locally in your browser. Nothing you paste is uploaded, logged, or stored.