JSON to TypeScript Converter
Turn any JSON into clean, nested TypeScript interfaces. Broken or AI-generated JSON is repaired automatically first.
{
"id": 42,
"name": "Ada Lovelace",
"active": true,
"roles": ["admin", "editor"]
}Runs entirely in your browser — nothing is uploaded.
Convert JSON to TypeScript Types Online
Hand-writing TypeScript types for an API response is tedious and error-prone. Paste the JSON and this JSON to TypeScript converter infers the shape for you — generating a named interface for every nested object and the correct element type for arrays (string[], number[], arrays of objects, and so on).
Built for messy, real-world JSON
Unlike most converters, this one is powered by our JSON repair engine. If you paste output straight from ChatGPT, Claude, or an API that wraps JSON in markdown fences or leaves trailing commas, it is repaired first, then converted — so you are never blocked by a stray character.
How to use it
- Paste your JSON (or click Example).
- Read the generated TypeScript interfaces on the right.
- Copy them, or download a
.tsfile.
Need more than types? Open the full JSON Studio to also generate a JSON Schema, query with JSONPath, format, validate, diff, and convert.
Other JSON Tools