- Executors
-
Learn
Python Learning Hub Runnable examples, NumPy, pandas, and more C & C++ Learning Hub Pointers, memory, STL, and modern C++ C# Learning HubC# basics, OOP, LINQ, async, and .NET exercises Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++
- Challenges
Converters
JSON to TypeScript Converter
Paste a JSON sample and get TypeScript interfaces for every nested object.
- Runs in your browser
- Instant results
- Free, no sign-up
Loading the tool…
How to use the JSON to TypeScript
- Paste a JSON object or array.
- Choose the root type name, interface or type, and export or readonly.
- Copy the TypeScript or download a .ts file.
Frequently asked questions
How are optional fields detected?
When an array contains objects, keys missing from some items are marked optional with ?.
How are null values typed?
Fields that are null in some samples get a | null union.
Should I use interface or type?
Both work for object shapes. Interfaces can be extended and merged; types are more flexible for unions.
Practice Python with coding challenges
Solve hands-on problems right in this editor: run the sample tests, submit, and get an AI code review.