Javascript is required

JSON to TypeScript Type Inference Workbench

Multi-Sample TypeScript Interface Inference

Compare multiple API payloads to detect optional properties (?), unions, and null values.

Root Interface:
Empty Array:

Payload Sample 1 (Primary)

Payload Sample 2 (Optional - For Union / Optional Field Detection)

Inferred TypeScript Interfaces

Automated TypeScript Interface Generation from JSON Samples

Automatically create TypeScript interface definitions from JSON objects. Infers types for nested objects, arrays, optional properties, and unions.

Speed up your TypeScript workflow by generating type-safe interfaces in seconds. Simply paste your JSON and copy the result.