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.
| Metric | superstruct | yup |
|---|---|---|
| Weekly downloads | 4,952,034 | 10,703,443✓ |
| Monthly downloads | 20,701,143 | 46,370,880✓ |
| GitHub stars | 7,143 | 23,678✓ |
| Minified size | 10.2 kB✓ | 42.7 kB |
| Minified + gzipped | 3.4 kB✓ | 13.1 kB |
| Dependencies | 0✓ | 4 |
| Open issues | 100✓ | 240 |
| Last commit | 2024-10-01 | 2026-06-01✓ |
| Latest version | 2.0.2 | 1.7.1 |
| License | MIT | MIT |
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
| Feature | superstruct | yup |
|---|---|---|
| Static type inference | ✓ Yes | Partial |
| Async validation | ✗ No | ✓ Yes |
| Standard Schema | ✗ No | ✓ Yes |
| API style | Composable functional | Chainable |
| Best for | Lightweight needs | Forms |
superstruct
A simple and composable way to validate data in JavaScript (and TypeScript).
Related comparisons
Embed this comparison
A live badge for your README — it updates as the numbers change.
[](https://devcompare.dev/compare/superstruct-vs-yup)Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.