UUID v4 v4 · random
The most widely used standard UUID, built from 122 random bits.
Overview
Aside from the 6 bits marking the version and variant, all 122 bits are random. Its collision probability is effectively zero, making it suitable for most uses.
Structure
| Bit length | 122 random |
|---|---|
| Character length | 36 |
| Format | hex 8-4-4-4-12 |
| Sortable | No |
| Random-based | Yes |
When to use
Use it by default for general unique identifiers with no special sorting or reproducibility needs. For database primary keys, also consider v7 for its sorting advantage.