json2ts
« Back to VersTracker
Description:
Compile JSONSchema to TypeScript type declarations
Type: Formula  |  Latest Version: 15.0.4@0  |  Tracked Since: Dec 24, 2025
Links: Homepage  |  GitHub  |  Docs  |  formulae.brew.sh
Stars: 3,227  |  Forks: 434  |  Language: TypeScript  |  Category: Developer tools
Tags: typescript json-schema code-generation type-safety developer-tool
Install: brew install json2ts
About:
json2ts is a Node.js library and CLI tool that automatically generates TypeScript type definitions from JSON Schema files. It ensures type safety by creating accurate interfaces, enums, and unions that match your schema's structure and constraints. This eliminates manual type declaration work and keeps your TypeScript code in sync with your data contracts.
Key Features:
  • Generates TypeScript interfaces, enums, and type aliases from JSON Schema
  • Supports schema references ($ref) and complex constraints
  • Customizable output formatting and style options
  • Can be used as a CLI tool or imported as a library
  • Handles a wide range of JSON Schema draft specifications
Use Cases:
  • Generating client-side TypeScript types for REST API responses defined by OpenAPI/Swagger
  • Maintaining type safety in full-stack applications where backend schemas define frontend data structures
  • Automating type generation in build pipelines to keep types synchronized with evolving schemas
Alternatives:
  • quicktype – Supports more input/output languages beyond TypeScript and JSON Schema, but json2ts is more specialized and feature-rich for the JSON Schema -> TypeScript conversion.
Version History
Detected Version Rev Change Commit
Dec 24, 2025 9:55pm 15.0.4 0 VERSION_BUMP cb2ababf
Jan 14, 2025 7:58am 0 VERSION_BUMP 4aefbe3a
Nov 8, 2024 12:55am 0 VERSION_BUMP b22054e1
Sep 14, 2024 10:12am 0 VERSION_BUMP 4a13606d