📋 ID Type Information
UUID v4 (Random)
Version 4 UUIDs are randomly generated using a cryptographically secure random number generator.
- 128 bits of randomness (122 random bits + 6 version/variant bits)
- Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
- Collision probability: ~1 in 5.3 x 10³⁶
- Most commonly used UUID version
Example: 550e8400-e29b-41d4-a716-446655440000
UUID v1 (Time-based)
Version 1 UUIDs are generated using timestamp and MAC address information.
- Contains timestamp (60-bit) and node information
- Can be traced back to creation time and device
- Not recommended for security-sensitive applications
- Sortable by creation time
Example: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
ULID (Universally Unique Lexicographically Sortable Identifier)
ULIDs are sortable, URL-safe unique identifiers.
- 128-bit compatibility with UUID
- Lexicographically sortable
- Case insensitive (uses Crockford's base32)
- No special characters (URL safe)
- 48-bit timestamp + 80 bits of randomness
Example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
Nano ID
A tiny, secure, URL-friendly unique string ID generator.
- Customizable length and alphabet
- 2x faster than UUID
- Smaller size (21 symbols vs 36 for UUID)
- URL safe by default
- Cryptographically strong random generator
Example: V1StGXR8_Z5jdHi6B-myT
MongoDB ObjectId
12-byte identifier consisting of timestamp, machine ID, process ID, and counter.
- 4-byte timestamp (Unix time)
- 5-byte random value unique to machine and process
- 3-byte incrementing counter
- Sortable by creation time
- Smaller than UUID (12 bytes vs 16 bytes)
Example: 507f1f77bcf86cd799439011
Snowflake ID
Twitter's distributed ID generation algorithm for high-scale systems.
- 64-bit integer
- Time-ordered (sortable)
- Generated without coordination between nodes
- 41 bits for timestamp + 10 bits for node + 12 bits sequence
- Can generate 4096 IDs per millisecond per node
Example: 1537200209829830656