A version 4 UUID is a 128-bit identifier built from random data. The six bits that mark the version and variant are fixed, and the remaining 122 bits come from a cryptographically secure random source. That leaves enough entropy that two independently generated values will not collide.
Generate UUIDs
What the digits mean
The canonical form is eight hexadecimal digits, then four, four, four and twelve, separated by hyphens, for example 123e4567-e89b-42d3-a456-426614174000. The first character of the third group is the version, which is 4 for a random UUID, and the first character of the fourth group encodes the variant. Together those fixed bits are why a random UUID carries 122 bits of entropy rather than 128.
UUIDs versus sequential IDs
Random UUIDs can be generated independently by any client without coordination, which makes them convenient for distributed systems and offline-created records. The trade-off is size and index locality: a UUID takes 16 bytes and random values scatter across a database index. Sequential integers are smaller and insert faster, but require a central authority or a scheme such as ULID when ordering matters.
Are UUIDs a security control?
No. A UUID is long enough that guessing one is impractical, so an unguessable identifier can be useful for unlisted links, but it is not authentication. Never treat possession of a UUID as proof of authorization, and never use one as a password, session token or secret key.
Values come from the Web Crypto API (crypto.getRandomValues), not Math.random. Generation stays in this browser tab.