UUID Generator
Generate version-4 UUIDs — one or a thousand at a time — using your browser's cryptographic random source. Options for uppercase, hyphen-free, and braced formats, ready to copy or download.
What's a v4 UUID? A 128-bit identifier with 122 random bits, like f47ac10b-58cc-4372-a567-0e02b2c3d479. The randomness is so vast that duplicates are practically impossible — you'd need to generate billions per second for decades to expect one collision.
UUID versions in 20 seconds
| Version | Based on | Use it when |
|---|---|---|
| v4 (this tool) | Random bits | Default choice: database keys, request IDs, filenames — anywhere you need uniqueness without coordination |
| v7 | Timestamp + random | Database primary keys at scale — sorts by creation time, friendlier to index performance |
| v5 | SHA-1 of a name | You need the same input to always produce the same UUID (deterministic) |
| v1 | Timestamp + MAC address | Legacy systems only — it leaks the generating machine's identity |
Frequently asked questions
Can two generated UUIDs ever collide?
Theoretically yes, practically no. With 122 random bits there are 5.3 undecillion possible v4 UUIDs — you would need to generate about a billion UUIDs per second for 85 years to reach a 50% chance of a single collision.
Are these UUIDs cryptographically random?
Yes — they come from crypto.randomUUID(), which uses your browser's cryptographically secure random number generator, not Math.random(). Generation happens on your device; nothing is transmitted.
Should I use UUIDs as database primary keys?
They're excellent for distributed systems since any node can generate keys without coordination. On very large tables, random v4 keys can fragment indexes — if that bites, UUID v7 (time-ordered) keeps the benefits with better index locality.
What do the '4' and the [89ab] character in every UUID mean?
They're the version and variant markers. The 13th hex digit is always 4 (version 4 = random), and the 17th is 8, 9, a, or b (the variant). The remaining 122 bits are pure randomness.