# TypeBox: 7.5 out of 10

A strong pick. 3rd of 10 in [Validation libraries](https://elestia.ai/opensource/validation/index.md).

TypeBox builds JSON Schema objects and infers static TypeScript types from them. It also ships a fast compiled validator. It is a strong pick for APIs that need JSON Schema or OpenAPI, especially on Fastify. For general app validation with transforms and a bigger ecosystem, Zod is usually the easier choice. New projects should use the ESM-only `typebox` 1.x package. `@sinclair/typebox` 0.34 is the long-term support (LTS) line.

**Best for:** Backend teams whose schemas must be real JSON Schema, for Fastify, OpenAPI or Ajv, and who want fast validation.

## Scores

- **Overall: 7.5** (likely 6.5 to 8.5)
  - Claude Opus 5.5 (7.0): It is a strong, fast and well-kept tool, and the best pick when schemas must be JSON Schema, as with Fastify and OpenAPI. For most new TypeScript apps, Zod has the larger ecosystem and the friendlier parsing API, and Valibot and ArkType are gaining ground faster. One maintainer and the package split keep it below the top of the category.
  - GPT-6.2 Sol (8.0): TypeBox is a strong pick when a new TypeScript project needs reusable JSON Schema and fast validation. Zod remains the broader default for general TypeScript validation, with more reported use and stronger download growth than the older TypeBox package. TypeBox 1.x is shipping regularly and growing quickly, while its smaller documented user base and reliance on one listed maintainer keep the range wide.
- **Needed by many: 6.9** (likely 5.8 to 7.9)
  - Claude Opus 5.5 (7.0): Most TypeScript projects need runtime validation. TypeBox's JSON-Schema-first approach fits backend and API work best, and front-end form work less. That makes its audience somewhat narrower than the whole category.
  - GPT-6.2 Sol (6.7): Runtime validation is useful for API requests, forms, configuration, and external data. TypeBox works without a framework, and its main advantage is strongest when another tool also consumes the JSON Schema. The available survey covers React developers, so it gives a limited view of demand across JavaScript and TypeScript projects.
- **Helps a lot: 8.1** (likely 7.1 to 9.0)
  - Claude Opus 5.5 (7.5): Its schemas are standard JSON Schema, its type inference is precise, and its compiled validator is among the fastest. It is weaker at transforms and parsing than Zod, and its error messages are less friendly. Users also report that AI agents get its API wrong without reference docs. The 1.x API renames add some friction.
  - GPT-6.2 Sol (8.6): TypeBox 1.4.7 combines precise inference with native JSON Schema and passes 99% of the independent draft 2020-12 test run. Its compiled check was about as fast as compiled Zod on the benchmark's invalid input. Users report friction with shared schema references and AI-generated examples. The benchmark measures specific workloads, and the reports on coding agents are anecdotal.
- **Holds up over time: 6.9** (likely 5.5 to 8.1)
  - Claude Opus 5.5 (6.5): The project is active: 211 commits and 30 npm versions in the last year, and zero open issues. A 0.x LTS line is promised through 2026 and beyond. Against that, one developer drives almost all the work, so the bus factor is high. The 1.x move to a new package name and ESM only splits the user base.
  - GPT-6.2 Sol (7.3): The repository logged 211 commits in the past year, and the 1.x package shipped four updates in November. The project maintains a 0.x support line and responded to a reported parsing regression in 1.1. One listed npm maintainer and user-reported migration work make the two-year outlook less certain.
- **Used widely: 6.7** (likely 5.5 to 7.9)
  - Claude Opus 5.5 (6.5): The 657M downloads per 4 weeks and 708k dependent repositories are inflated, because Jest's @jest/schemas installs TypeBox for most of its users. The growth ratio of 2.55 is below the 4.1 median and far below Zod's and Valibot's, although the downloads of the new `typebox` package are not counted here. Direct choices, mostly through Fastify, are likely in the tens to low hundreds of thousands. Bluesky and Hacker News attention is low next to Zod and ArkType.
  - GPT-6.2 Sol (6.9): The older package grew 2.55 times year over year, below the 4.1 median, and many of its installs come through other tools. The current package reached 16.7 million downloads in one November week, up sharply from a small base a year earlier. The older package's roughly 708,000 indexed dependent repositories show substantial reach, while the React survey and peer attention favor Zod. Direct adoption of 1.x is still hard to estimate from installs and counts that cover different package generations.
- **Vouched for: 7.2** (likely 6.1 to 8.2)
  - Claude Opus 5.5 (6.5): Fastify officially supports it as a type provider, and companies such as Val Town have written about running it in production. Independent benchmarks also rate it well. It has little presence in developer surveys, and much of the public praise is from 2024–2025.
  - GPT-6.2 Sol (7.8): Fastify supports TypeBox 1.x through its official type provider, and Elysia builds its route schema API on TypeBox and documents 1.x for Elysia 2. Independent testing confirms strong standards compliance on the current release. Public evidence on long-term production use and satisfaction with 1.x remains limited.
- **Safe: 7.6** (likely 6.5 to 8.6)
  - Claude Opus 5.5 (7.5): It has zero dependencies, an MIT licence and no known advisories. The OpenSSF Scorecard is only 5. Code-Review, Branch-Protection and Token-Permissions all score 0, which fits a single maintainer who publishes without review.
  - GPT-6.2 Sol (7.6): TypeBox 1.4.7 has an MIT license, zero runtime dependencies, and no known published advisories affecting it. A July code injection advisory missing from the bundle affected 0.x, and patches for the affected branches shipped within two days. GitHub Actions publishes with npm provenance, while the package has one listed maintainer. OpenSSF's 5 out of 10 score and weak marks for review, branch protection, token permissions, and fuzzing leave uncertainty about release safeguards.

## Good

- Schemas are plain JSON Schema, so the same definition drives validation, OpenAPI docs and static types.
- The compiled validator is among the fastest in independent benchmarks, and the package has zero dependencies.
- It is Fastify's main type provider, and Hono and other server tools have adapters for it.
- The 0.x LTS line keeps both CJS and ESM, while 1.x targets the TypeScript 7 native compiler.

## Bad

- One person maintains and publishes it, so the project depends heavily on him.
- The split between `@sinclair/typebox` 0.34 and the ESM-only `typebox` 1.x, with renamed APIs, confuses users and AI agents.
- Transforms, coercion and custom refinements are clumsier than in Zod or Valibot.
- AI coding agents often get its API wrong without reference docs, and it has a smaller tutorial and integration ecosystem than Zod.

## The numbers

- Downloads, 4 weeks: 657M
- In a year: ×2.6
- GitHub stars: 7k
- Commits, 12 months: 211
- Last npm release: Jul 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/sinclairzx81/typebox
- npm: https://www.npmjs.com/package/@sinclair/typebox

TypeBox 1 is published as the package typebox. These numbers are of the older @sinclair/typebox, which still has about 10 times the downloads because other tools install it.

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
