v4 or v7?
| Version | How it is made | Best for |
|---|---|---|
| v4 | 122 random bits | General unique IDs, tokens, file names |
| v7 | Unix timestamp in milliseconds + random bits (RFC 9562) | Database primary keys — sorts by creation time, which keeps indexes fast |
All UUIDs are generated in your browser with crypto.getRandomValues, a cryptographically secure random generator. Choose formatting options for your language: no hyphens, uppercase (common for Windows GUIDs) or braces.
Frequently asked questions
Can two UUIDs ever be the same?
For v4 the chance is astronomically small — you would need to generate billions per second for many years to expect a collision.
Is a GUID the same as a UUID?
Yes. GUID is Microsoft's name for the same 128-bit identifier.
Why use UUID v7 for databases?
Because v7 values increase over time, new rows are inserted at the end of the index, which is faster than random v4 keys.

