CUID & CUID2
Generator
Precision-engineered unique identifiers for the modern web. Generated, validated, and converted with glass-speed.
Quick CUID
Quick CUID2
All-in-One CUID Tools
Everything you need to work with CUIDs and CUID2s in one place.
CUID Generator
Generate collision-resistant unique identifiers with embedded timestamps.
CUID2 Generator
Create secure, unpredictable identifiers with configurable length.
Validator
Verify if a string is a valid CUID or CUID2 format.
Timestamp Extract
Extract the timestamp embedded in CUID v1 identifiers.
CUID Encoder
Convert any timestamp or date into a valid CUID v1.
What is CUID?
CUID (Collision-resistant Unique IDentifier) is a type of unique identifier designed for horizontal scaling and performance in distributed systems. Unlike traditional auto-incrementing IDs or UUIDs, CUIDs are optimized for client-side generation while maintaining uniqueness across multiple systems.
A standard CUID is 25 characters long and consists of:
- Prefix: Always 'c' to identify it as a CUID
- Timestamp: Base36 encoded milliseconds since epoch
- Counter: Incrementing counter to prevent collisions
- Fingerprint: Machine/process identifier
- Random: Random characters for additional uniqueness
Why CUID2?
CUID2 is the next generation of collision-resistant IDs, designed with modern security requirements in mind. Key improvements include:
- Cryptographically secure: Uses secure random number generation
- No predictable patterns: IDs don't reveal creation order
- Configurable length: Choose between 2-32 characters
- Better collision resistance: Improved entropy distribution
- Smaller default size: 24 characters vs 25 for CUID v1
Use CUID2 when security is a priority, such as for session tokens, API keys, or any scenario where predictable IDs could be exploited.
CUID vs UUID vs CUID2
Compare different unique identifier formats to choose the best one for your needs.
| Feature | CUID | CUID2 | UUID v4 |
|---|---|---|---|
| Length | 25 chars | 24 chars (default) | 36 chars |
| URL Safe | ✓ | ✓ | ✗ (hyphens) |
| Sortable | ✓ | ✗ | ✗ |
| Contains Timestamp | ✓ | ✗ | ✗ |
| Cryptographically Secure | ✗ | ✓ | ✓ |
| Configurable Length | ✗ | ✓ (2-32) | ✗ |
Frequently Asked Questions
Everything you need to know about CUID and CUID2 identifiers.
What is a CUID?
A CUID (Collision-resistant Unique IDentifier) is a type of identifier designed to be globally unique without requiring coordination between systems. It is a type of identifier designed to be globally unique without requiring coordination between systems. CUIDs are created using a combination of a timestamp, a counter, a client fingerprint, and random data, which ensures their uniqueness even in distributed systems.
What is CUID2, and how does it differ from CUID?
Designed with enhanced security features, CUID2 is the successor to CUID. Unlike CUID, CUID2 uses cryptographically secure random number generation and does not encode timestamps in a predictable manner. These features make CUID2 more suitable for security-sensitive applications where IDs should not be guessable or reveal the order of creation.
When should I use a CUID versus a UUID?
Use a CUID when you need a shorter identifier that is still collision-resistant and readable. CUIDs are useful for distributed systems, URLs, and mobile applications. Use a UUID when strict compliance with UUID standards is required, such as when integrating with systems that specifically require the UUID format.
Is it secure to use CUIDs in URLs?
Yes, CUIDs are designed to be URL-safe. They only contain lowercase letters and numbers, making them ideal for use in URLs, file names, and database identifiers. CUID2 adds an extra layer of security by making the IDs unpredictable.
Is it possible to extract the timestamp from a CUID?
Yes, for CUID v1, the timestamp is encoded in Base36 within the CUID structure (characters 2–9). Our converter tool can extract and display the timestamp. However, CUID2 does not contain an extractable timestamp because it uses a different, more secure generation method.
How many CUIDs can I generate at once?
Our bulk generator can create up to 100 CUIDs or CUID2s at once. Then, you can copy all the IDs to your clipboard or download them as a text file to easily use them in your applications.