Developer Tools100% private
JSON to TypeScript Types
Generate TypeScript interfaces and type definitions from JSON data samples.
// Click Convert to generate types
How it works
- 1Paste JSONEnter a valid JSON object or array.
- 2ConvertTypeScript interfaces are generated with proper nesting and type inference.
- 3CopyCopy the generated types and paste them into your TypeScript project.
Frequently asked questions
What types are generated?
Strings become string, numbers become number, booleans become boolean, arrays become T[], and objects become interfaces with nested types.
Does it handle nested objects?
Yes. Nested objects generate separate interfaces with proper naming (e.g., address becomes Address interface).
What about null values?
Null values are typed as `null`. If a field can be null or another type, you may want to adjust the output to use union types.