Generate and validate UUIDs

Make a UUID.

Generate UUIDs v1, v4, v7, or nil. Bulk generate up to 200 at a time. Validate any UUID and see its version and variant. Pure browser; no login.

Validate a UUID

UUIDs explained: v1, v4, v7 and nil

A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits in five groups, such as 550e8400-e29b-41d4-a716-446655440000. Any program can create one without asking a central server, and two UUIDs made anywhere in the world will practically never collide. That is why databases, APIs, log systems and file formats use them as IDs.

The current standard is RFC 9562 (2024), which replaced RFC 4122. It defines several versions. This page makes the three that matter in practice, plus the all-zero nil UUID, and it can read any UUID you paste to tell you its version and variant.

How to use it

  1. Choose a version. If you are unsure, v4 is the safe default; pick v7 when the IDs will be database keys.
  2. Set how many you need, from 1 to 200, and press Regenerate for a fresh batch.
  3. Copy a single UUID with the button next to it.
  4. To inspect an existing UUID, paste it into Validate a UUID. The tool checks the canonical 8-4-4-4-12 format and shows the version digit and the variant.

Example: reading a UUID someone sent you

Input
018f3c2a-7b1e-7c4d-9a2b-3c4d5e6f7a8b
Output
Version 7, variant rfc4122.

The version is the first digit of the third group (7 here). The variant comes from the first digit of the fourth group: 8, 9, a or b means the standard RFC layout.

Which version should you use?

v4 is 122 random bits with 6 fixed bits for version and variant. It reveals nothing about when or where it was made, which makes it a good public identifier. Its randomness is also its weakness as a database key: new rows land at random places in the index, so inserts into a large B-tree index get slower and the index fragments.

v7 puts the Unix time in milliseconds in the first 48 bits and fills the rest with random bits. IDs made later sort after IDs made earlier, so new rows append to the end of an index like an auto-increment number would, while still being safe to generate on many machines at once. The trade-off is that anyone holding the ID can read its creation time.

v1 is the original time-based format. It stores the time in 100-nanosecond steps since 15 October 1582 and traditionally the network card's MAC address. This tool follows RFC 9562 and uses a random node with the multicast bit set instead of your MAC address, so nothing identifies your device. Prefer v7 for new systems: v1's time fields are stored in an order that does not sort.

How unlikely is a collision?

With 122 random bits, you would need to generate about 2.7 quintillion v4 UUIDs before the chance of a single duplicate reached 50%. A real collision is far more likely to come from a broken random number generator than from bad luck. Here every random bit comes from crypto.getRandomValues, the browser's cryptographically secure generator.

Questions

Are UUIDs case sensitive?

No. The hex digits mean the same in upper or lower case. RFC 9562 recommends writing them in lower case, which is what this tool outputs, and the validator accepts both.

What is the nil UUID for?

It is all zeros and means no value, much like null. Use it as a placeholder or a default, never as a real identifier.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit format. Some old Microsoft GUIDs use a different variant, which the validator reports as microsoft.

Can I use a UUID as a secret token?

A v4 from a secure generator is hard to guess, but UUIDs are designed to be unique, not secret. For password-reset links or API keys, use a dedicated random token generator.