UUID / GUID Generator
Generate Universally Unique Identifiers (UUIDs) also known as GUIDs. Create version 1 (time-based), version 4 (random), and nil UUIDs in various formats.
UUID / GUID Generator
Generate Universally Unique Identifiers (UUIDs) also known as GUIDs. Create version 1 (time-based), version 4 (random), and nil UUIDs in various formats.
Use case: General purpose, web applications, APIs
Common Applications
Database Primary Keys
Unique identifiers for database records that won't conflict during distributed operations
Recommended: v4 recommended
- No central coordination needed
- Can generate offline
- No ID conflicts in replication
Distributed Systems
Unique identifiers across multiple servers, microservices, or data centers
Recommended: v1 or v4
- Globally unique
- Time-ordered (v1)
- No single point of failure
File & Asset IDs
Unique names for files, images, documents in storage systems
Recommended: v4 recommended
- No naming conflicts
- Obfuscates sequential access
- URL-safe when formatted properly
Session & Tracking IDs
Unique identifiers for user sessions, analytics events, logs
Recommended: v4
- No correlation between IDs
- Privacy preserving
- Stateless generation
Technical Specification
UUID Structure
UUID: 123e4567-e89b-12d3-a456-426614174000
│ │ │ │ │
│ │ │ │ └── Node (6 bytes: a456-426614174000)
│ │ │ └─────── Clock sequence (2 bytes: a456)
│ │ └──────────── Variant & clock seq high (1 byte: 3)
│ └───────────────── Version & time high (1 byte: d)
└─────────────────────────── Time low & mid (6 bytes: 123e4567-e89b-12)Version Comparison
| Version | Type | Use When |
|---|---|---|
| v1 | Time-based | Need ordering, debugging |
| v4 | Random | General purpose, security |
| nil | All zeros | Testing, placeholders |
Standards & Specifications
- RFC 4122: UUID URN Namespace
- ISO/IEC 11578:1996
- ITU-T Rec. X.667
- Size: 16 bytes (128 bits)
- String: 36 characters with hyphens, 32 without
Best Practices
Collision Probability
Chance of duplicate v4 UUID
To have 1% probability of collision:
2.71 quadrillion UUIDs