UUID Generator
Generate random UUID v4 identifiers using your browser's cryptographic random number generator. Make one or a hundred at once, nothing is sent anywhere.
What's a UUID v4?
128 bits of randomness, formatted as a standard identifier.
A UUID v4 is 122 random bits (the other 6 are fixed to mark the version and variant), giving roughly 5.3 undecillion possible values. Collisions are so unlikely they're not a practical concern for database primary keys, request IDs, or file names.
Common uses
Database primary keys that don't leak row counts, idempotency keys for API requests, correlation IDs for tracing logs across services, and unique file or session names that won't collide even generated on different machines at the same time.
How it works
Each ID comes from crypto.randomUUID(), the browser's built-in generator. Under the hood it pulls 128 bits from the operating system's cryptographically secure random source (the same one that generates TLS keys), then stamps 6 of those bits with fixed values: the version nibble becomes 4 and the variant bits become 10. That's why every UUID here has a 4 at the start of the third group and an 8, 9, a, or b starting the fourth. The remaining 122 bits are pure randomness, which is what makes collisions a non-issue in practice.
How much of a non-issue? There are 2^122 possible v4 UUIDs, about 5.3 undecillion. The birthday-problem math says you'd need to generate roughly 103 trillion UUIDs before the odds of even one collision reach one in a million. Every ID your systems will ever mint is a rounding error against that, which is why v4 UUIDs are safe to generate on any machine with no coordination.
Generation is a single browser API call, so nothing is requested from a server and nothing is sent to one: open DevTools' Network tab, click Generate, and watch nothing happen. The uppercase and no-hyphens toggles only reformat the IDs already generated; the underlying values don't change.
One practical note: v4 UUIDs are deliberately unordered, so as database primary keys they scatter inserts across an index. If you need IDs that sort by creation time, look at UUID v7, which puts a timestamp in the high bits. For everything else (request IDs, filenames, correlation tokens), random v4 is exactly right.
From the blog: What Is a UUID? A Plain-English Explanation