Privvert logoPrivvert

JSON → TypeScript

Genera interfaces

Sobre esta herramienta

Paste any JSON sample and get strongly-typed TypeScript interfaces or types. Detects optional fields by merging arrays of objects with different shapes.

Características

  • interface or type output
  • Merges array elements into a single shape with optionals
  • Names nested types from their key
  • Quoted keys for non-identifiers

Cómo usarla

  1. Paste a JSON example.
  2. Set the root type name.
  3. Copy the generated TypeScript.
🔒 100% privado

Todo sucede dentro de tu navegador usando JavaScript y WebAssembly. Tus archivos nunca se suben a un servidor, nunca se almacenan y nosotros nunca los vemos.

Preguntas frecuentes

Can it infer string literal unions?

Currently it produces 'string'; literal-union inference is on the roadmap.