Generate TypeScript interfaces from JSON
JSON to TypeScript generates a single Root interface with one field per top-level JSON key, entirely in your browser — nothing is uploaded to a server. Strings, numbers, and booleans map directly to their TypeScript types; arrays are typed as any[] and nested objects as object, since nested values aren't recursively converted into their own interfaces. Field names are inserted as plain identifiers with no quoting, so a JSON key containing a hyphen or space will produce invalid TypeScript.
Is JSON to TypeScript free to use?
Yes, it's completely free with no signup required.
Does it generate nested interfaces for nested JSON?
No — only top-level keys become typed fields. Nested objects are typed as object and arrays as any[], rather than generating separate nested interfaces.
What if my JSON has unusual field names, like ones with hyphens or spaces?
Field names are inserted as plain TypeScript identifiers with no quoting, so a key like "first-name" produces invalid syntax — you'll need to manually wrap such names in quotes.
Can I download the generated code as a file?
No, there's only a 'Copy' button — paste the copied code into a file yourself.