JSON to TypeScript

Terms of Service

About this tool

This free browser utility converts a JSON sample into TypeScript declarations locally and lets you copy or save them. Use it only if you agree to these terms.

Your responsibility

You retain ownership of your data. Selecting a file or pasting JSON does not grant permission to publish it. Only process data you are entitled to use. Review and test the generated types in your own environment before relying on them, and keep your original input and a backup.

Limits

Types are inferred from the one sample you provide and are not a runtime validator. An empty array becomes unknown[]; arrays of objects are merged into a single interface with missing keys optional; arrays that mix value kinds become a union; null maps to the null type; numbers have no integer/float distinction; and object keys follow JavaScript property order. The tool reports JSON syntax errors but does not check your data against a schema. Input is limited to 2,000,000 characters, 512 levels of nesting and 5,000 generated object types; generation runs on the browser main thread and very large inputs may briefly block it. Only UTF-8 input is supported; downloads are UTF-8.

Privacy

Pasted JSON and selected files are processed locally as described in the Privacy Policy. Your original input is not changed.

Availability

The service is provided "as is" and "as available," without a guarantee of compatibility or uninterrupted operation. Nothing here limits rights that cannot lawfully be excluded.

Components

This tool uses only built-in browser features and includes no third-party runtime libraries.

Changes

Features and these terms may change; updated terms apply to later use.