JSON to TypeScript Interface
Generate TypeScript interfaces from sample JSON, with optional properties inferred from arrays.
Runs in your browserJSON → TypeScript
Loading tool…
Example
{"id":1,"tags":["a"],"owner":{"name":"Ada"}}export interface Root {
id: number;
tags: string[];
owner: Owner;
}
export interface Owner {
name: string;
}How to use the JSON to TypeScript Interface
- Paste or type your JSON into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the TypeScript result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
Related converters
JSON to Go StructGenerate Go struct definitions with json tags from sample JSON.JSON to SQL ConverterGenerate SQL INSERT statements from a JSON array of objects, with proper quoting and NULLs.JSON to C# ClassGenerate C# classes with System.Text.Json attributes from sample JSON.JSON to Markdown TableConvert a JSON array of objects into a GitHub-flavoured Markdown table.JSON to Java ClassGenerate Java POJO classes with Jackson annotations, getters and setters from sample JSON.JSON to HTML TableTurn a JSON array into an HTML table with a header row, with a safe live preview.JSON to Python DataclassGenerate Python dataclasses with type hints from sample JSON.JSON to YAML ConverterConvert JSON to clean, readable YAML for configuration files such as Kubernetes or CI pipelines.