UUID Generator
Generate RFC 4122 version 4 UUIDs locally, with collision-probability maths for your volume.
Inputs
Generated in your browser — nothing is sent anywhere.
Used for the collision-probability estimate over the lifetime of your system.
Generated UUIDs
0
First UUID
442f4d76-6519-4a9c-afde-277aef784931
Random Bits per UUID
122
Collision Probability at Your Volume
9.404 × 10⁻²⁶
Entropy Source
WebCrypto getRandomValues (cryptographically strong)
Step by step
Random bits per v4 UUID
128 bits total − 4 version bits − 2 variant bits
= 122 bits
Size of the identifier space
2^122
= 5.317e+36
Collision probability at your volume
1,000,000² ÷ (2 × 2^122)
= 9.404e-26
How it works
A version 4 UUID is 128 bits, of which 122 are random: four bits encode the version and two encode the RFC 4122 variant. That leaves an identifier space of 2^122 ≈ 5.3 × 10^36 values, which is why v4 UUIDs can be generated independently on many machines without coordination. The chance that any two collide follows the birthday approximation, p ≈ n² / (2 × 2^122) for n identifiers, so even at a billion IDs the probability stays around 10^-19 — far below the failure rate of the hardware storing them. Generation here happens entirely in your browser using WebCrypto, so no identifier is ever transmitted.
Formulas
Collision probability (birthday approximation)
p ≈ n² / (2 × 2^122)
- n
- Total number of UUIDs generated over the system's lifetime
- 2^{122}
- Size of the v4 random space (122 random bits)
Canonical v4 layout
xxxxxxxx-xxxx-4xxx-Nxxx-xxxxxxxxxxxx where N ∈ {8, 9, a, b}
- 4
- Version nibble, fixed to 4
- N
- Variant nibble, top two bits fixed to binary 10
Frequently Asked Questions
Are these UUIDs safe to use as database primary keys?
Yes for uniqueness, but consider the storage and index-locality cost: a random v4 UUID scatters inserts across a B-tree index, which is why time-ordered variants such as UUIDv7 or ULID are often preferred for high-insert-rate tables.
Can I use a v4 UUID as a security token or password reset key?
Only when it comes from a cryptographically strong source, which this tool reports. 122 random bits is ample entropy, but many UUID libraries historically used weak PRNGs, so verify the generator rather than assuming the format implies strength.
Why is the version character always 4?
RFC 4122 reserves the first nibble of the third group for the version number, so a version 4 (random) UUID always shows a literal 4 there. The first character of the fourth group is the variant and is always 8, 9, a or b.
How likely is a collision in practice?
At one billion UUIDs the probability is roughly 10^-19. You would need to generate about 2.7 × 10^18 UUIDs before reaching a 50% chance of a single collision.