Developer & PM Utility
Generate cryptographically random version-4 UUIDs in bulk for test data, primary keys, and request IDs.
A UUID (Universally Unique Identifier) is a 128-bit identifier designed so that generating one
independently, anywhere, is astronomically unlikely to collide with any other UUID ever generated. This
tool generates version-4 UUIDs — the random-based variant, and by far the most common type used in
application development — using your browser's cryptographically secure random number generator
(crypto.getRandomValues).
A v4 UUID has 122 random bits (the other 6 bits are fixed to identify the version and variant). To have a 50% chance of a single collision, you'd need to generate roughly 2.7 quintillion UUIDs. For virtually any practical application — database primary keys, request IDs, test fixtures — collisions are not a realistic concern.
| Situation | Better fit |
|---|---|
| Single, centrally controlled database | Auto-incrementing integer |
| Multiple services generating IDs independently | UUID |
| Don't want to reveal how many records exist | UUID |
| Merging data from separate databases later | UUID |
| Storage size / index performance is critical at huge scale | Auto-incrementing integer |
For the full reasoning behind each of these, including how UUIDs are actually structured and why version 4 is the one you almost always want, see What Is a UUID and Why Does It Matter?
crypto.getRandomValues(), the Web Crypto API's cryptographically secure random number generator, rather than Math.random().