JSON → TypeScript / Schema
Turn JSON into TypeScript interfaces or JSON Schema draft-07 online. Nested objects, arrays, and integer detection included.
JSON → TypeScript / JSON Schema
Output
interface IRoot_address {
city: string;
zip: string;
}
interface IRoot {
id: number;
name: string;
tags: string[];
address: IRoot_address;
active: boolean;
}
type Root = IRoot;How to use
- Paste a JSON sample (fill arrays with an example element).
- Pick TypeScript interfaces or JSON Schema output.
- Copy into your codebase.
FAQ
Optional fields?
All fields emit required — mark optionals yourself; shape inference can't know.
Empty arrays?
Type as unknown[] since element type is unknowable. Fill a sample element for better output.