UUID generator

Create one or hundreds of UUIDs at once using your browser's cryptographic random generator.

Tier 0 · browser · unlimited
UUIDs
 

UUIDs in practice

A UUID (universally unique identifier) is a 128-bit value written as 32 hex digits in five groups: 550e8400-e29b-41d4-a716-446655440000. Systems create them independently, with no central counter, and still never collide in practice. They are used as database keys, request and trace IDs, file names and message IDs.

Version 4 is fully random: 122 random bits. It is the default almost everywhere. Version 7, standardised in RFC 9562 (2024), starts with a millisecond timestamp, so new IDs sort after old ones. That keeps database indexes compact and makes IDs roughly chronological, which is why many teams now prefer v7 for primary keys.

Worked example

In 018f3c2a-7b1e-7c4d-9a2f-5e6b7c8d9e0f, the 7 at the start of the third group is the version, and the 9 at the start of the fourth group shows the RFC variant (8, 9, a or b). The first 12 hex digits, 018f3c2a7b1e, are the creation time in milliseconds since 1970.

How unique is unique?

With 122 random bits, generating a billion v4 UUIDs gives roughly a one in 10¹⁹ chance of any duplicate.

How this works

The page uses crypto.getRandomValues, the browser's cryptographically secure random generator, for every random bit. For version 4 it fills 16 bytes with random data, then sets the four version bits to 0100 and the two variant bits to 10, as RFC 9562 requires. For version 7 it writes the current Unix time in milliseconds into the first 48 bits and fills the rest with random data before setting the version and variant bits. IDs are generated only in your browser when the page loads and each time you click Generate; none are stored or sent.

Frequently asked

UUID v4 or v7?

v4 for general random IDs. v7 when the IDs are database keys or should sort by creation time.

Is a UUID the same as a GUID?

Yes. GUID is Microsoft's name for the same 128-bit format, usually shown in uppercase and sometimes in braces.

Can two generated UUIDs be the same?

In theory, but the probability is negligible: about one in 10¹⁹ even after a billion v4 UUIDs.

Are these UUIDs safe to use as secrets?

v4 has 122 random bits from a secure generator, but UUIDs are designed as identifiers. For tokens, use a dedicated secret generator.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/dev/uuid-generator/