paralleldrive/cuid2

The most secure, collision-resistant ids optimized for horizontal scaling and performance.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 50 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 20th, 2026
Created on December 26th, 2022
Open Issues & Pull Requests: 9 (+0)
GitHub issues: Enabled
Number of forks: 73
Total Stargazers: 3,402 (+0)
Total Subscribers: 14 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (2)
  • help wanted (1)
  • invalid (1)
  • wontfix (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Cuid2 is a JavaScript library for generating secure, collision-resistant unique identifiers optimized for horizontal scaling and performance.

The problem Cuid2 solves is the need for unique identifiers that are both cryptographically secure and suitable for distributed systems. Standard UUIDs and GUIDs can collide in large applications and may leak information about referenced data. Cuid2 addresses this by combining multiple independent entropy sources and hashing them with SHA3, a NIST-standard cryptographically secure algorithm. The approach makes it infeasible to guess the next ID or learn anything about the data from the ID itself. The tool generates IDs without requiring network coordination or async operations, making it suitable for offline use and horizontal scaling across multiple machines.

Cuid2 is well-suited for applications that need secure, globally unique identifiers across distributed systems without central coordination. It works as a drop-in replacement for UUID-based systems where security and collision resistance matter. The tool is not appropriate for applications requiring sequential or k-sortable IDs, nor for performance-critical tight loops like render loops where a simple counter or alternatives like Ulid or NanoId would be more suitable. The library is small, synchronous, and fast enough for typical application needs while maintaining security properties through intentional hashing overhead that prevents parallel attacks.

The project maintains active development with regular updates and bug fixes. The codebase shows consistent attention to security practices and performance optimization. The tool has established itself as a widely-adopted solution with substantial real-world usage across many applications.