How UUID v4 works
A UUID is a 128-bit identifier. Under RFC 9562 §5.4, UUID v4 contains 122 random bits: random_a, random_b, and random_c. The remaining six bits identify version 4 and the RFC UUID variant. RFC 9562 superseded RFC 4122.
The canonical pattern is xxxxxxxx-xxxx-4xxx-Nxxx-xxxxxxxxxxxx, where N is 8, 9, a, or b. The hyphens are display separators, not old-style time, clock, or node data. UUID v4 embeds neither a timestamp nor a MAC address.
Local randomness and security
This page feature-detects crypto.randomUUID() and validates its result. If unavailable, it uses crypto.getRandomValues(), then sets and validates the v4 version and variant bits. If neither secure API is available, the tool shows an error and does not generate values. Nothing is uploaded.
Cryptographically strong randomness makes v4 useful for opaque distributed IDs, but a UUID should not automatically replace a purpose-built API key, password-reset token, session secret, or authorization credential. Adding a prefix or suffix creates a wrapped identifier rather than a canonical UUID.
Last reviewed: .
