Skip to tool

UUID Generator

Fully random. The most common choice. 122 bits of entropy from a CSPRNG.

1–1000. The list below updates as you change it.
ABCDEF instead of abcdef
Standard 8-4-4-4-12 format

What a UUID is and which versions this tool generates

A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits in five groups, 8-4-4-4-12. Applications use UUIDs as database keys, request IDs and file names because any machine can create one without asking a central server for the next number.

This generator creates three versions defined in RFC 9562: v4 (random), v7 (ordered by Unix time) and v1 (Gregorian timestamp).

How each UUID version is built

Every RFC 9562 UUID has two fixed fields. The version is the 13th hex digit (first digit of the third group). The variant is the top two bits of the fourth group, binary 10, so that group always starts with 8, 9, a or b.

v4 comes from the browser's crypto.randomUUID(), or from crypto.getRandomValues() with the version and variant bits set by hand if that function is missing. Six bits are fixed and 122 are random.

v7 starts with the Unix time in milliseconds (48 bits), then the version digit 7 and 74 random bits. Because the timestamp comes first, v7 values from different milliseconds sort in creation order, so new database rows land at the end of a B-tree index instead of at random positions.

v1 stores 100-nanosecond intervals since 15 October 1582. This tool derives it from the millisecond clock, picks a random clock sequence, and uses a random node ID with the multicast bit set instead of your MAC address, as RFC 9562 allows.

Decoding a v7 and a v4 UUID

v7: 01a1532c-b000-70f6-b8cd-428aeec2b731. The first 12 hex digits, 0x01a1532cb000, equal 1,792,396,800,000 ms after the Unix epoch: 2026-10-19 08:00:00.000 UTC. The 13th digit, 7, is the version. In the fourth group, b is binary 1011; the leading 10 is the variant and everything after it is random.

v4: bdfcdb41-4acb-42a9-96bf-377fd4f1498d. The 13th digit is 4 and the fourth group starts with 9 (binary 1001), so the variant is again 10. Nothing else carries meaning.

With 122 random bits, about 2.7 × 10^18 v4 UUIDs are needed before the chance of any duplicate reaches 50%.

Limitations of this generator

  • Batches are capped at 1000 UUIDs.
  • v7 does not use RFC 9562's optional monotonic counter, so UUIDs created in the same millisecond, common within one batch, are not guaranteed to sort in generation order.
  • v1 and v7 reveal their creation time to anyone holding the ID. Use v4 if that matters.
  • Many systems compare UUIDs as plain strings, so mixed case or the hyphen-free form can cause mismatches.
  • v3, v5, v6 and v8 are not offered.

UUID questions

Should I use v4 or v7?

Use v7 for database primary keys and anything sorted by creation time; RFC 9562 recommends v7 over v1 and v6 for new systems. Use v4 when the ID should not reveal when it was made.

Is a UUID the same as a GUID?

Yes. GUID is Microsoft's name for the same 128-bit format, often printed in uppercase inside braces.

Can I use a v4 UUID as a password reset token or API key?

No. RFC 9562 section 8 says implementations should not assume UUIDs are hard to guess and must not use them as security capabilities. Use a token designed for secrets.

Why does the v1 UUID not contain my MAC address?

Classic v1 uses the network card's MAC address as the node ID, which exposes hardware information. A random node with the multicast bit set avoids that and cannot clash with a real card's address.

Can two UUIDs be the same?

For v4 it is possible but negligible. Among n random v4 UUIDs, the chance of any duplicate is about n² / 2^123: for one billion UUIDs that is about 9.4 × 10^-20. Duplicates in practice come from bugs such as a badly seeded random generator or copying the same value, not from chance.

Standards and references