Elestia Open Source Ratings
3.9

Superstruct

Keep, but not for new work. 9th of 10 validation libraries.

Superstruct is a small, composable, dependency-free validation library with TypeScript inference. Its last release was v2.0.2 in July 2024, and the repository has had no commits since October 2024. Its download growth trails the median, and much of it comes from Solana's older web3.js SDK, which installs it. Keep it where it already runs, but use Zod or Valibot for new work.

Best for: Existing codebases that already use Superstruct and want a tiny validator with no dependencies; new projects should pick Valibot or Zod.

WebsiteGitHubnpm

Scores

Overall3.9

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 3.5, likely 2.5 to 4.5

It still works and is small and safe to keep. But maintenance has stopped, it lacks Standard Schema support, and its growth trails the median. Valibot gives the same small, functional approach with active development, and Zod is the ecosystem default. Pick one of those for new work.

GPT-6.2 Sol: 4.3, likely 3.3 to 5.4

Superstruct remains capable for existing schemas and straightforward validation. For new work, Zod offers broader tooling and active releases, and Valibot offers a maintained modular option for small bundles. Superstruct’s long release gap and unfinished compatibility work weigh most, while its small footprint and useful API leave room for specific projects to choose it.

Needed by many7.2

How many developers need a tool for this job?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

Most JavaScript and TypeScript projects need to validate external data at some point. Superstruct is a general-purpose schema validator that works on any runtime and with any framework. So its breadth matches the category's.

  • github description: General data validation for JavaScript and TypeScript
  • npm dependencies: Zero dependencies, runtime-agnostic

GPT-6.2 Sol: 6.8, likely 5.7 to 7.9

Runtime validation is useful across APIs, forms, and configuration, and Superstruct works across JavaScript and TypeScript projects without tying them to a framework. Its approach fits teams that want to define schemas in code. Frontend surveys show that schema validation is common, but they only cover part of the JavaScript ecosystem.

Helps a lot5.8

How well does it do the job for those who need it?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

The core API is clean and composable, with good type inference and coercion. But it has no Standard Schema support, no async validation and no built-in string formats. By default it reports only the first error. Valibot does the same job better in an equally small package, and Zod has a much richer ecosystem.

GPT-6.2 Sol: 6.5, likely 5.4 to 7.6

Stable 2.0.2 has a well-documented API for type narrowing, coercion, custom checks, and errors with field paths. A CommonJS typing issue remains open, and the documented React Hook Form integration exposes fewer errors than its Zod and Valibot counterparts. An independent benchmark found fast results on its fixture, while performance across current workloads and the quality of agent-generated code are less well measured.

Holds up over time2.4

Will it still be a good choice in two years?

Claude Opus 5.5: 2.0, likely 1.0 to 3.5

The repository has had no commits or releases in the last year, and its last push was in October 2024. 82 issues and 27 pull requests are open, and a July 2026 security-hardening issue has no visible response. A community fork exists because the maintainer stopped responding, and MetaMask keeps its own fork. Both are signs that the original is stalled.

GPT-6.2 Sol: 2.7, likely 1.6 to 3.8

The project handed maintenance to two volunteers, and the last stable release was in July 2024. The bundle records zero commits and releases in the past year, while Zod and Valibot shipped updates in 2026. Long-open compatibility and integration requests weigh against a quick response to future tooling changes, although existing schemas may need little upkeep.

Used widely4.6

How many use it, and is that growing?

Claude Opus 5.5: 4.5, likely 3.5 to 5.5

38M downloads in 4 weeks looks large, but much of it comes from @solana/web3.js 1.x, which installs it as a dependency. The year-on-year ratio is about 3.0, below the 4.1 median, so it is losing ground. The 17k dependent repositories are far fewer than Zod's or Yup's, but more than Valibot's or ArkType's.

  • npm downloadsLast4Weeks: 38.0M against 12.5M a year ago, a ratio of about 3.0, below the 4.1 median
  • dependents: 17,088 repositories and 589 packages
  • socket.dev/npm/package/@solana/web3.js/diff/1.96.0: Solana web3.js 1.x depends on superstruct ^2.0.2
  • bluesky posts: 0 posts, against 32 for Zod and 88 for ArkType

GPT-6.2 Sol: 4.6, likely 3.4 to 5.8

Ecosyste.ms found 17,088 dependent repositories and 589 dependent packages, an established base below Zod, Yup, and Joi in the same index. Four-week downloads rose from 12.5 million to 38.0 million, but the 3.05× ratio fell below the catalog median of 4.1× as Zod and Valibot grew faster. Repeat installs and dependencies such as Solana’s legacy SDK make the number of direct choices uncertain.

  • dependents: 17,088 repositories and 589 packages in the index.
  • npm.downloadsLast4Weeks: 38.0 million installs in four weeks.
  • npm.downloadsSame4WeeksYearAgo: 12.5 million in the same period a year earlier.
  • medianDownloadsRatio: 4.1× catalog median versus Superstruct’s 3.05×.
  • peers: Zod and Valibot lead in download growth.
  • github.com/solana-foundation/solana-web3.js/blob/maintenance/v1.x/package.json: Solana’s legacy SDK installs Superstruct 2.0.2.
Vouched for4.2

Who stands behind it being good?

Claude Opus 5.5: 3.5, likely 2.5 to 5.0

Solana's 1.x SDK and MetaMask use or used it in production. MetaMask moved to its own fork, and Solana's successor, @solana/kit, moves away from it. Current independent write-ups mostly recommend Zod or Valibot over it. It has no Hacker News or Bluesky attention in the period.

GPT-6.2 Sol: 4.8, likely 3.6 to 6.0

Solana’s legacy JavaScript SDK depends on Superstruct, and React Hook Form maintains a dedicated resolver. The State of Frontend 2024 survey recorded 1.4% who used and liked it and 0.7% who used and disliked it. The survey is dated, and MetaMask’s move to its own compatibility fork limits how much its use says about the upstream package today.

Safe6.2

How safe is it to depend on?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

It has zero dependencies, an MIT licence and no published advisories, so the attack surface is small. The OpenSSF Scorecard is weak at 3.4, with no security policy, unpinned dependencies and a Maintained score of 0. A validation-bypass hardening issue from July 2026 has no visible reply, so any future flaw may stay unfixed.

  • advisories total: 0 advisories
  • scorecard score: 3.4, with Security-Policy, Maintained and Pinned-Dependencies at 0
  • npm dependencies: 0 dependencies
  • github.com/ianstormtaylor/superstruct/issues: Issue #1301 on a getter/Proxy validation bypass is open

GPT-6.2 Sol: 6.3, likely 5.1 to 7.5

Zero runtime dependencies, an MIT licence, and zero advisories in the bundle keep dependency exposure low. The 3.4 OpenSSF Scorecard flags weak review and workflow controls and a missing security policy. Package metadata lists two maintainers, and the latest GitHub release names one publisher. Slow maintenance and an open hardening report for live JavaScript objects leave uncertainty about how quickly future issues would be handled.

Good

  • No runtime dependencies and a small bundle.
  • A simple functional API that composes structs, with coercion and refinements.
  • Good TypeScript inference through the Infer helper.
  • MIT licence and no published security advisories.

Bad

  • No commits since October 2024 and no release since v2.0.2 in July 2024.
  • No Standard Schema support, so it fits poorly with tRPC, form libraries and other tools that now expect it.
  • There are no built-in string formats such as email or URL, and async validation is missing.
  • A community fork and the MetaMask fork split the user base, and neither replaces the original package.

The numbers

npm downloads, 4 weeks
38M ×3.0 in a year
GitHub stars
7.1k
Commits, 12 months
0
npm version
2.0.2 Jul 2024
Versions, 12 months
0
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
3.4 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (ianstormtaylor/superstruct), npm (superstruct), OSV and the OpenSSF Scorecard.

Validation libraries

  1. 9.0Zod
  2. 7.9Valibot
  3. 7.5TypeBox
  4. 7.2ArkType
  5. 7.1Ajv
  6. 6.2Joi
  7. 5.6class-validator
  8. 5.2Yup
  9. 3.9Superstruct
  10. 3.8io-ts
Compare all 10 on six scores