JSON to TypeScript Interface

Generate TypeScript interfaces from JSON. Free, instant.

{var t=typeof o[k];if(t==='object'&&o[k]!==null)t=Array.isArray(o[k])?'any[]':'object';r+=' '+k+': '+t+';\\n'});return r+'}'}catch(e){return 'Invalid JSON'}"}'>

How to Use JSON to TypeScript Interface

1

Paste JSON.

2

Get TypeScript interface.

3

Copy or download your result.

Frequently Asked Questions

Does it handle nested objects?

Basic nesting. For complex schemas, use dedicated tools.