JSON Schema to TypeScript

JSON →
library 15.0.4 ·javascript
verified May 27, 2026

json-schema-to-typescript is a utility that compiles JSON Schemas into TypeScript type declarations, enabling strong typing for data structures defined in JSON. Currently at version 15.0.4, it offers both a command-line interface (CLI) for file-based conversions and a programmatic API for integrating into build processes or applications. It is actively maintained with regular updates. Key differentiators include its robust handling of various JSON Schema features like `allOf`, `anyOf`, `oneOf`, `definitions`, and `$ref` for both local and external references. It aims to provide a reliable way to keep TypeScript types synchronized with JSON Schema definitions, reducing manual type creation and potential discrepancies between data contracts and application code. The library supports customizable options for output formatting, banner comments, and how `additionalProperties` are handled, which is crucial for controlling the strictness of generated types. It's particularly useful for projects consuming APIs or data where JSON Schema is the source of truth, facilitating a 'schema-first' development approach.

total hits 18
actors 9 distinct systems
last hit 20h ago Googlebot
MetaBot
4
GPTBot
2
Script
2
ByteDance
2
Amazonbot
1
Search engines
2

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France · 🇮🇳 India