superstruct vs yup

yup is downloaded 2.2× more often than superstruct (46,370,880 vs 20,701,143 per month), so it has the larger community and more answered questions online. superstruct ships 74% less gzipped JavaScript (3.4 kB vs 13.1 kB), which matters if bundle size is a priority. yup has been updated more recently, a sign of more active maintenance.

Metricsuperstructyup
Weekly downloads4,952,03410,703,443
Monthly downloads20,701,14346,370,880
GitHub stars7,14323,678
Minified size10.2 kB42.7 kB
Minified + gzipped3.4 kB13.1 kB
Dependencies04
Open issues100240
Last commit2024-10-012026-06-01
Latest version2.0.21.7.1
LicenseMITMIT

When to choose which

superstruct

Lightweight, composable data validation.

Choose it when: Simple, composable validation with a small footprint when you don't need Zod's full feature set.

  • + Small & composable
  • + Type inference
  • - Sync only
  • - Smaller ecosystem

yup

Schema validation popular with forms.

Choose it when: Form validation, especially with Formik, or teams already familiar with its object-schema API.

  • + Form ecosystem (Formik)
  • + Familiar API
  • - Less precise inference than Zod
  • - Chaining quirks

Feature comparison

Featuresuperstructyup
Static type inference✓ YesPartial
Async validation✗ No✓ Yes
Standard Schema✗ No✓ Yes
API styleComposable functionalChainable
Best forLightweight needsForms

superstruct

A simple and composable way to validate data in JavaScript (and TypeScript).

yup

Dead simple Object schema validation

Related comparisons

Embed this comparison

A live badge for your README — it updates as the numbers change.

superstruct vs yup downloads
[![superstruct vs yup](https://devcompare.dev/badge/superstruct-vs-yup.svg)](https://devcompare.dev/compare/superstruct-vs-yup)

Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.