Skip to content
N NotAtAll

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. 1 Paste a representative JSON object or array.
  2. 2 Choose the root type name.
  3. 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.