UUID v4 - Random UUIDs
UUID v4 fills 122 of its 128 bits with cryptographically secure randomness - collision odds stay negligible at any realistic scale, which is why v4 is the default for primary keys and API identifiers.
How this version compares with the other six - and when each one earns its keep - is covered in UUID versions explained.
When to Use This Version
Use UUID v4 for almost everything: database primary keys, API resource IDs, session tokens, correlation IDs. It's the default choice when you don't need time-ordering or deterministic generation. The collision probability is astronomically low - 2.71 quintillion UUIDs for 50% chance.
Best Practices
V4 is simple and effective for most use cases. Store as binary (16 bytes) in databases for efficiency. Use lowercase hex format (RFC 4122 standard) unless working with Microsoft systems. Don't try to extract information from v4 - it's pure random.