JSON to TypeScript Converter
Paste one JSON object or an array of samples and generate TypeScript interfaces or type aliases. Infer optional and union fields, preserve nulls, detect ISO dates and quote unusual keys safely.
🔒 100% private — files never leave your browser
How to use the JSON to TypeScript
- 1 Paste a representative JSON object or array.
- 2 Choose the root type name.
- 3 Generate, review and copy the TypeScript interfaces into your project.
Frequently asked questions
Does it support nested JSON?
Yes. Nested objects become separate interfaces and arrays receive inferred item types. Use a representative sample when an API field can have multiple shapes.
Are optional fields detected?
When the root is an array of objects, missing fields are marked optional when optional inference is enabled. A single object has no evidence for optionality.
Is the JSON uploaded?
No. Parsing and type generation happen locally in your browser.
More free tools
JSON Formatter Format, validate and minify JSON with syntax highlighting and clear error messages. Free, instant, and fully client-side. Token Counter Count tokens with exact OpenAI tokenizers (o200k/cl100k) plus Claude & Gemini estimates. Characters, words, sentences — 100% client-side. CSV ⇄ JSON Converter Convert CSV to JSON or JSON to CSV instantly. Handles quoted fields, custom delimiters and header rows — paste, convert, copy. Fully client-side. Fake Data Generator Generate synthetic names, emails, usernames, phones, companies, cities and UUIDs as JSON or CSV for testing. Free, local and no signup.