JSON to TypeScript converter
Convert JSON to TypeScript interfaces in your browser. Paste or drop a file — nothing is uploaded.
Ads
Paste or drop .json
Nothing leaves this device. No account required.
Generate TypeScript from JSON locally
API payloads and config files arrive as JSON, but TypeScript projects need named interfaces for autocomplete and type checks. Generating interfaces from a real sample skips hand-writing nested shapes and keeps field names aligned with the wire format.
What the TypeScript output includes
- Objects become export interface declarations with inferred property types
- Missing keys across array samples become optional properties (?)
- null values produce T | null unions; empty arrays become unknown[]
- Nested objects get their own PascalCase interfaces referenced by name
How to convert JSON to TypeScript
- Paste JSON or drop a .json file into the converter.
- Optionally set a Root name for the top-level type, then click Convert.
- Copy or download the TypeScript interfaces — generation never left your browser.
FAQ
- Is this JSON to TypeScript converter free?
- Yes. Formatly generates TypeScript interfaces from JSON in the browser at no charge and without an account.
- Do you upload my JSON?
- No. Parsing and interface generation run locally on this device. Nothing is sent to a server.
- Are the interfaces exact types or best-effort?
- They are inferred from the sample. Mixed arrays become unions, and fields that only appear on some objects are marked optional.
Other code generators
Looking for formatters? JSON Formatter · All developer tools.