cuid2
Reasonable, with limits. 5th of 9 ID generators.
Cuid2 makes secure, hard-to-guess, collision-resistant string IDs by hashing several entropy sources with SHA3. It is a sound choice when IDs must not be guessable. But it is slower than Nano ID, and it cannot be sorted or stored as binary the way UUIDv7 can, so most new projects are better served by one of those.
Best for: Teams that want non-sequential, hard-to-guess string IDs for public records or URLs and accept slower generation.
Scores
Overall6.2
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a well-designed, maintained library for unguessable IDs, with a clean record. For most new projects, Nano ID is faster, smaller and has no dependencies, and UUIDv7 is better for database keys. That puts Cuid2 behind both for general use. It remains a reasonable pick when resistance to enumeration is the main need.
- peers Nano ID: 1.5B downloads, 1.6M dependent repos, 139 commits
- peers uuid: Default UUID choice with v7 support
- mintlify.com/jkomyno/uniku/guides/performance: CUID2 slowest of the common generators
- github.com/prisma/prisma-engines/issues/3826: Recommended successor to cuid v1
GPT-6.2 Sol: 6.4, likely 5.4 to 7.5
Cuid2 is a reasonable choice for a modern application that needs lowercase IDs compatible with Prisma's `cuid(2)` format. Nano ID is the stronger general choice for compact IDs because it generates them faster and offers a configurable alphabet. UUID v7 is the better fit when systems need a standardized, time-ordered format. Cuid2's release gap, earlier packaging regressions, and below-baseline growth make it a weaker general default.
- docs.prisma.io/docs/orm/v7/reference/prisma-schema-reference#cuid: Prisma documents use of Cuid2 for string IDs.
- diegobetto.com/en/uuid-ulid-nanoid-cuid2-guide: Compares generation speed, ID formats, and time ordering.
- github.com/paralleldrive/cuid2/blob/main/CHANGELOG.md: Documents the ESM migration and subsequent packaging fixes.
- npm latestPublishedAt, npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: Long release gap and weaker download growth than Nano ID and the catalog baseline.
Needed by many5.8
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Most apps that store records need unique IDs, so the category is broad. Cuid2's take, secure but unsorted string IDs, fits a smaller part of that group than general UUIDs do. It is not tied to any framework or runtime.
- github.com/paralleldrive/cuid2: Runtime-agnostic, aimed at secure IDs for horizontally scaled apps
- mintlify.com/jkomyno/uniku/guides/choosing-an-id: Guide places CUID2 as the pick for hard-to-guess IDs, UUIDv7 for DB keys
GPT-6.2 Sol: 5.6, likely 4.4 to 6.8
Many web applications need IDs for records, links, or files, and Cuid2 fits both server and browser code without tying projects to a framework. The audience narrows to teams that need its lowercase, opaque format because built-in UUIDs cover many of the same jobs. Developer surveys show how common web development is but give no direct measure of demand for this format.
- 2025.stateofjs.com/en-US/usage: Frontend and backend development are common JavaScript use cases.
- github.com/paralleldrive/cuid2: Documents offline generation and URL-safe output.
- developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID: Modern browsers provide native UUID generation.
Helps a lot6.4
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
The security design is careful, the API is small and typed, and there is now a CLI. But generation is clearly slower than Nano ID or crypto.randomUUID, and the IDs cannot be sorted or stored compactly, which matters for database keys. A peer does each common case better, but none matches it on unguessable IDs.
- mintlify.com/jkomyno/uniku/guides/performance: Third-party benchmark ranks CUID2 slowest due to SHA3-512
- github.com/paralleldrive/cuid2: README says not for tight loops; Web Crypto by default since Oct 2025
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 6.8, likely 5.8 to 7.8
Version 3.3.0 has a small, documented API with bundled types, configurable length, and a format checker. The checker tests shape and length, and the generator's length error claims a lower bound that the code does not enforce. Independent Node.js benchmarks put it behind Nano ID and native UUID generation, though the size of the gap varies by benchmark. The generation call is straightforward for coding agents, but there are no direct measurements of agent accuracy.
- raw.githubusercontent.com/paralleldrive/cuid2/v3.3.0/index.d.ts: Named types cover generation, configuration, and format checks.
- raw.githubusercontent.com/paralleldrive/cuid2/v3.3.0/src/index.js: Shows format checking and incomplete length validation.
- github.com/thomastheyoung/nexid#performance: Node 22 benchmark puts Cuid2 behind Nano ID and native UUID.
- diegobetto.com/en/uuid-ulid-nanoid-cuid2-guide: Independent benchmark reports the same ordering with a smaller gap.
Holds up over time5.9
Will it still be a good choice in two years?
Claude Opus 5.5: 6.0, likely 4.5 to 7.0
There were 48 commits in the last year, the latest push was November 2026, and few issues are open. Work depends mostly on one maintainer with no listed sponsors, and there are no GitHub releases. The 3.x major added dependencies, and formidable still pins 2.2.2.
- github commitsLastYear: 48 commits, pushed 2026-11-20
- npm versionsLastYear: 4 versions, latest 3.3.0 in Jan 2026
- github openIssues: 2 open vs 56 closed issues; 7 open PRs
- github.com/paralleldrive/cuid2: No sponsors or used-by list
GPT-6.2 Sol: 5.8, likely 4.5 to 7.1
The repository recorded 48 commits over the past year and a November push, while npm publishing slowed after January 2026. Users reported that an accidental ESM change in a 2.x release broke downstream installs, and a compatibility release followed four days after the report. Version 3.3.0 also fixed a reported TypeScript regression. Two npm maintainers are listed, but recent work appears concentrated and long-term funding is unclear.
- github commitsLastYear, pushedAt, openIssues, openPullRequests: Recent push, 48 annual commits, two open issues, and seven open pull requests.
- npm versionsLastYear, latestPublishedAt: Four versions in the window, with the latest in January.
- github.com/paralleldrive/cuid2/issues/105: Downstream users reported breakage, and the maintainer shipped a fix four days later.
- github.com/paralleldrive/cuid2/blob/main/CHANGELOG.md: Records the ESM transition and the 3.3.0 TypeScript fix.
- intel.aikido.dev/packages/npm/@paralleldrive/cuid2: Lists two npm maintainers and concentrated recent commit activity.
Used widely4.7
How many use it, and is that growing?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
Downloads are 120M per 4 weeks, but formidable (pulled in by superagent and supertest) depends on it, so most installs are not direct choices. The year-on-year ratio of about 3.7 is a bit below the 4.1 median, so it is slightly losing ground. Only 97 dependent repos are counted, against 12k for ulid, though scoped packages may be undercounted.
- npm downloadsLast4Weeks: 119.9M vs 32.2M a year ago, ratio ~3.7 vs 4.1 median
- github.com/node-formidable/formidable/blob/master/package.json: formidable depends on @paralleldrive/cuid2 2.2.2
- dependents: 97 repos, 94 packages, far below Nano ID and ulid
- github stars: 3.4k stars, similar to ulid
GPT-6.2 Sol: 3.9, likely 2.6 to 5.5
Four-week downloads rose from 32.2 million to 119.9 million, a 3.73× increase against the 4.1× catalog baseline. That suggests a modest loss of relative ground, while installations through Formidable and Prisma make direct adoption hard to infer. The repository has 3,409 stars, but the collector found only 97 dependent repositories and 94 packages, well below uuid and Nano ID. Limited coverage of scoped packages and sparse social discussion leave the direct user count uncertain.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Download growth trails the catalog median.
- dependents, peers dependentRepos, github stars, hackerNews, bluesky: Few indexed dependents relative to leading peers and little social discussion.
- raw.githubusercontent.com/node-formidable/formidable/v3.5.4/package.json: Formidable pulls in the Cuid2 2.x line for its users.
- github.com/prisma/orm/pull/29764: Prisma merged the 3.3.0 upgrade as a direct production dependency.
Vouched for5.9
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.5 to 6.5
formidable adopted it, and Prisma's cuid v1 deprecation pointed users toward Cuid2. Drizzle and Prisma users build community plugins on it. There are no named production users, no survey data, and only thin independent write-ups.
- github.com/prisma/prisma-engines/issues/3826: Prisma users told to move from cuid v1 to Cuid2
- app.unpkg.com/drizzle-cuid2@2.2.0/files/README.md: Community Drizzle integration built on it
- dev.to/pipipi-dev/database-id-design-choosing-id-methods-and-primary-key-strategies-49h4: Independent author uses CUID2 for short URLs
- hackerNews: Only two small HN stories
GPT-6.2 Sol: 6.8, likely 5.7 to 8.0
Prisma ORM upgraded its production dependency to 3.3.0, and Sentry's changelog app lists the same release line. Formidable chose the older 2.x line to generate upload filenames. Those are concrete uses, but there is little direct evidence on satisfaction or retention across teams using version 3.
- github.com/prisma/orm/pull/29764: Prisma approved and merged the 3.3.0 production dependency.
- github.com/getsentry/sentry-changelog/blob/main/package.json: Sentry's changelog app declares Cuid2 3.3.0 as a runtime dependency.
- github.com/node-formidable/formidable/blob/master/CHANGELOG.md: Formidable adopted the package to generate upload filenames.
- 2025.stateofjs.com/en-US/other-tools: The survey does not provide a Cuid2 satisfaction or retention measure.
Safe6.8
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
There are no advisories and the licence is MIT. It uses Web Crypto by default with an audited hash library. It now pulls in three runtime dependencies, there is no Scorecard, and releases appear to rest on a small set of publishers.
- advisories total: 0 advisories
- github.com/paralleldrive/cuid2/blob/main/package.json: Deps: @noble/hashes, bignumber.js, error-causes
- scorecard: No OpenSSF Scorecard available
- npm license: MIT
GPT-6.2 Sol: 6.5, likely 5.2 to 7.8
Cuid2 uses the permissive MIT license, has three direct dependencies, and has no advisories in the supplied OSV snapshot. Version 3.3.0 uses Web Crypto where available and silently falls back to `Math.random()` elsewhere, weakening the randomness guarantee across runtimes. The release script runs tests before publishing to npm, but Aikido reports no build provenance and the bundle has no OpenSSF Scorecard result. Those gaps limit confidence in the publishing controls.
- advisories total, scorecard, npm dependencies, npm license: Zero recorded advisories, no Scorecard result, three dependencies, and MIT.
- raw.githubusercontent.com/paralleldrive/cuid2/v3.3.0/src/index.js: Uses Web Crypto when available and otherwise falls back to Math.random.
- raw.githubusercontent.com/paralleldrive/cuid2/v3.3.0/.release-it.json: Release configuration runs tests before publishing.
- intel.aikido.dev/packages/npm/@paralleldrive/cuid2: Lists two npm maintainers and reports no build attestation.
Good
- IDs are hashed and leak no timestamp or host data, so they are hard to guess or enumerate.
- The API is simple (createId, init with a custom length, isCuid), ships types and works in Node, browsers and edge runtimes.
- No known advisories, and it is the documented successor to the deprecated cuid v1 that Prisma users know.
- Still maintained, with commits up to November 2026 and four npm versions in the last year.
Bad
- SHA3 hashing makes it the slowest common generator, and its README warns against tight loops.
- IDs are not time-sortable and have no binary form, so database indexes do worse than with UUIDv7 or ULID.
- The v3 line added runtime dependencies (bignumber.js, error-causes) on top of @noble/hashes, while Nano ID has none.
- Most downloads arrive through formidable, which pins 2.2.2, so downloads overstate direct choice.
The numbers
- npm downloads, 4 weeks
- 120M ×3.7 in a year
- GitHub stars
- 3.4k
- Commits, 12 months
- 48
- npm version
- 3.3.0 Jan 2026
- Versions, 12 months
- 4
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (paralleldrive/cuid2), npm (@paralleldrive/cuid2), OSV and the OpenSSF Scorecard.