Create unique identifiers for databases, tests and APIs.
Version 4 UUIDs are 122 random bits, formatted as the familiar 8-4-4-4-12 groups, and they are the usual choice when you just need a unique ID. Version 7 UUIDs begin with a millisecond timestamp followed by random bits, so they sort in creation order, which makes database indexes more efficient.
Generate up to 1000 at a time, and use the options to produce uppercase values, remove hyphens for a compact 32 character form, or wrap each in braces as some Windows tools expect.
In practice no. With 122 random bits, the chance of a collision among billions of IDs is vanishingly small.
When the ID is a database primary key. Because they are roughly ordered by time, inserts land near each other in an index.
Do not use them as passwords or access tokens unless generated by a secure random source and treated as secrets. Version 7 also reveals its creation time.