# cuid2: 6.2 out of 10

Reasonable, with limits. 5th of 9 in [ID generators](https://elestia.ai/opensource/ids/index.md).

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

- **Overall: 6.2** (likely 5.2 to 7.3)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (6.4): 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.
- **Needed by many: 5.8** (likely 4.7 to 6.9)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (5.6): 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.
- **Helps a lot: 6.4** (likely 5.4 to 7.4)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (6.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.
- **Holds up over time: 5.9** (likely 4.5 to 7.1)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (5.8): 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.
- **Used widely: 4.7** (likely 3.6 to 6.0)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (3.9): 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.
- **Vouched for: 5.9** (likely 4.6 to 7.3)
  - Claude Opus 5.5 (5.0): 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.
  - GPT-6.2 Sol (6.8): 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.
- **Safe: 6.8** (likely 5.6 to 7.9)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (6.5): 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.

## 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

- Downloads, 4 weeks: 120M
- In a year: ×3.7
- GitHub stars: 3.4k
- Commits, 12 months: 48
- Last npm release: Jan 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/paralleldrive/cuid2
- npm: https://www.npmjs.com/package/@paralleldrive/cuid2

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 22 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.
