Types, straight from your JSON.
Paste raw JSON and get clean, production-ready TypeScript interfaces on the fly — nested objects, smart unions, optional fields, and zero setup.
- 100% client-side — nothing uploaded
- Free, no sign-up
- Interface & type aliases
// Types appear here — paste JSON on the left.
Why set your types with JSONts
An engineering-grade type generator that respects your data and your time.
Deep Composition
Every nested object becomes its own named interface — and identical structures are de-duplicated, so your type file stays tight.
Smart Inference
Mixed arrays merge into one type: missing keys become optional ?, differing values become precise unions like null | string.
Private by Design
The whole press runs in your browser. API responses, config files and private payloads are never uploaded, logged or stored.
Frequently Asked Questions
How do I convert JSON to TypeScript interfaces?
Paste your JSON into the left pane of the JSONts converter. The tool parses it instantly and prints ready-to-use TypeScript interfaces in the right pane. Click Copy Types or Download .d.ts to take the result into your project.
Is this JSON to TypeScript converter free?
Yes. JSONts is completely free with no sign-up, no limits and no watermarks. It runs entirely in your browser, so there is nothing to install and no account required.
Does my JSON data get uploaded anywhere?
No. The conversion runs 100% client-side in your browser with JavaScript. Your JSON never leaves your machine, which makes JSONts safe for API responses, config files and private payloads.
How are nested objects handled?
Every nested object becomes its own named interface, derived from the property name. For example, a nested "profile" object becomes an interface called Profile, and the parent field references it as profile: Profile.
What happens when an array contains objects with different keys?
JSONts merges all object shapes in the array into one interface. Keys missing from some elements become optional fields with the ? modifier, and keys with different value types become union types.
Can I generate type aliases instead of interfaces?
Yes. Use the interface / type switch in the toolbar above the editor. Interface mode emits interface Name { ... } blocks, while type mode emits type Name = { ... } aliases.
How are null values converted?
By default, null is merged into unions, so a field that is sometimes a string and sometimes null becomes null | string. You can disable the Null Unions option to treat null strictly as the literal null type.