# UUID Generator

A UUID is a 128-bit identifier written as 32 hex digits, such as 919108f7-52d1-4320-9bac-f847db4148a8. Version 4 is random (122 random bits) and version 7 starts with a Unix millisecond timestamp so UUIDs sort by creation time. Choose a version and a count up to 1,000 below to generate them on this device, then copy them all. The inspector reads any UUID you paste: the RFC 9562 example 017F22E2-79B0-7CC3-98C4-DC0C0C07398F is 7: Unix time, ordered, in the RFC 9562 variant, created at 2022-02-22T19:22:22.000Z.

Canonical page: https://ponderloop.com/tools/uuid-generator/
Updated: 2026-10-07

## How to use

How to generate UUIDs

1. **Pick a version**: Choose version 4 for a fully random identifier, or version 7 when you want UUIDs that sort by creation time, for example as database primary keys.
2. **Choose how many**: Enter a count from 1 to 1,000. The list updates as you change it.
3. **Set the format**: Tick uppercase, no hyphens or braces to match what your system expects, for example {919108F752D143209BACF847DB4148A8} for all three together.
4. **Copy all**: Press Copy all to put the list, one UUID per line, on your clipboard. Generate new makes a fresh list.
5. **Inspect a UUID**: Paste any UUID into the inspector to see its version, its variant and, for versions 1, 6 and 7, the time inside it.

## Reference tables and worked examples

### UUID versions

The version is the first digit of the third group. Versions 1 to 8 are those RFC 9562 lists; version 2 predates it.

| Version | Name | What it holds | Embedded timestamp |
| --- | --- | --- | --- |
| 1 | Gregorian time | 60-bit count of 100-nanosecond ticks since 1582-10-15, a clock sequence and a node ID | Yes |
| 2 | DCE Security | Like version 1, with a POSIX user or group ID replacing part of the time; not defined by RFC 9562 | No |
| 3 | Name-based, MD5 | MD5 hash of a namespace UUID and a name | No |
| 4 | Random | 122 random bits | No |
| 5 | Name-based, SHA-1 | SHA-1 hash of a namespace UUID and a name | No |
| 6 | Reordered Gregorian time | Version 1 with the time fields reordered so UUIDs sort by time | Yes |
| 7 | Unix time, ordered | 48-bit Unix millisecond timestamp followed by 74 random bits | Yes |
| 8 | Custom | 122 bits whose layout the application defines | No |

### UUID variants

The variant is in the top bits of the first digit of the fourth group: 8, 9, a or b for the RFC 9562 variant.

| Leading bits | Variant | Meaning |
| --- | --- | --- |
| 0xxx | NCS backward compatibility | Reserved for the old Apollo Network Computing System. |
| 10xx | RFC 9562 | The variant this standard defines, used by every UUID the tool generates. |
| 110x | Microsoft (legacy GUID) | Reserved for early Microsoft Windows GUIDs. |
| 111x | Reserved for future definition | Includes the Max UUID, all ones. |

### Example UUIDs from RFC 9562, inspected

Each row is the inspector’s own output for a UUID printed in the standard.

| UUID | Source | Version | Variant | Timestamp (UTC) |
| --- | --- | --- | --- | --- |
| c232ab00-9414-11ec-b3c8-9f6bdeced846 | RFC 9562 §5.1 | 1: Gregorian time | RFC 9562 | 2022-02-22T19:22:22.0000000Z |
| 919108f7-52d1-4320-9bac-f847db4148a8 | RFC 9562 §5.4 | 4: Random | RFC 9562 | None |
| 017f22e2-79b0-7cc3-98c4-dc0c0c07398f | RFC 9562 §5.7 | 7: Unix time, ordered | RFC 9562 | 2022-02-22T19:22:22.000Z |
| 00000000-0000-0000-0000-000000000000 | RFC 9562 §5.9 | Nil UUID | NCS backward compatibility | None |
| ffffffff-ffff-ffff-ffff-ffffffffffff | RFC 9562 §5.10 | Max UUID | Reserved for future definition | None |

### The version 7 example, field by field

The RFC 9562 §5.7 UUID 017f22e2-79b0-7cc3-98c4-dc0c0c07398f, taken apart. The timestamp row is read with the same function as the inspector.

| Field | Hex digits | Bits | Value |
| --- | --- | --- | --- |
| Unix timestamp | 017f22e2-79b0 | 48 | 1645557742000 ms, 2022-02-22T19:22:22.000Z |
| Version | 7 | 4 | 7, 7: Unix time, ordered |
| Random A | cc3 | 12 | Random bits (12) |
| Variant | 9 | 2 | 1001, RFC 9562 (bits 10xx) |
| Random B | 8c4-dc0c0c07398f | 62 | Random bits: these 15 digits plus the low 2 bits of the variant digit |

### Where the 128 bits go

Both versions spend 6 bits on the version and variant, leaving 122 for the rest.

| Field | Version 4 | Version 7 |
| --- | --- | --- |
| Unix timestamp (milliseconds) | 0 bits | 48 bits |
| Version | 4 bits (0100) | 4 bits (0111) |
| Variant | 2 bits (10) | 2 bits (10) |
| Random | 122 bits | 74 bits |
| Total | 128 bits | 128 bits |

### The same UUID in common formats

The RFC 9562 version 7 example written the ways other systems expect it. Every one reads back as the same UUID (7: Unix time, ordered).

| Format | Where you meet it | Written as |
| --- | --- | --- |
| Lowercase with hyphens | RFC 9562, JSON, most databases and APIs | 017f22e2-79b0-7cc3-98c4-dc0c0c07398f |
| Uppercase with hyphens | Some Windows and .NET output | 017F22E2-79B0-7CC3-98C4-DC0C0C07398F |
| No hyphens | Compact IDs and file names | 017f22e279b07cc398c4dc0c0c07398f |
| Braces | Windows registry and COM GUIDs | {017F22E2-79B0-7CC3-98C4-DC0C0C07398F} |
| URN | XML, RDF and other places that need a URN | urn:uuid:017f22e2-79b0-7cc3-98c4-dc0c0c07398f |

## How it works

A version 4 UUID is crypto.randomUUID(), or 16 bytes from crypto.getRandomValues with the version bits set to 0100 and the variant bits to 10, which leaves 122 random bits. A version 7 UUID is the current time in Unix milliseconds as 48 bits, the version bits 0111, the variant bits 10 and 74 more bits taken from the same generator. Within one millisecond the random part starts from a random 73-bit value and counts up by one for each further UUID (the monotonic random method of RFC 9562 §6.2), and a clock that steps backwards keeps the last timestamp, so output is always in increasing order. The inspector accepts upper or lower case, optional hyphens, braces and a urn:uuid: prefix, reads the version and variant bits, and for versions 1 and 6 converts the 60-bit tick count from 1582-10-15 to UTC, and for version 7 the 48-bit millisecond count from 1970. The collision figures use the birthday approximation n ≈ √(2 · 2^122 · ln(1/(1 − p))). The example above is fixed, so the page looks the same whenever it is built.

## FAQ

### What is a UUID?

A universally unique identifier is a 128-bit value, written as 32 hexadecimal digits in five hyphen-separated groups (8-4-4-4-12). RFC 9562 defines it, and the same value is called a GUID on Windows. Because there are so many possible values, systems can create IDs independently, with no central counter, and expect them not to repeat.

### What is the difference between UUID v4 and v7?

Version 4 is 122 random bits, so UUIDs have no order and a database index fills in random places. Version 7 puts a 48-bit Unix millisecond timestamp first, followed by 74 random bits, so newer UUIDs sort after older ones and inserts land at the end of an index. The cost is that a v7 UUID reveals when it was created, to the millisecond.

### Are the UUIDs random enough, and are they unique?

They come from your browser’s cryptographically secure generator (crypto.randomUUID, or crypto.getRandomValues where that is missing). With 122 random bits, you would need about 2.7 quintillion version 4 UUIDs for a 50% chance of any two matching; generating a billion per second, that takes about 86 years. For a one in a billion chance of a repeat you could still make about 103 trillion of them. A collision is possible in theory but not something to plan around. Uniqueness is only as good as the random source, which is why generators should never use Math.random.

### Is a UUID safe to use as a secret or password?

No. A UUID is built to be unique, not secret. A version 7 UUID shows its creation time, version 4 has a fixed shape, and UUIDs often appear in URLs and logs. Use a token from a password or secret generator for anything that grants access.

### How does the inspector find the version and variant?

The version is the first hex digit of the third group (the 4 in 4320). The variant is the top bits of the first digit of the fourth group: 9bac starts with 9, binary 1001, which is the RFC 9562 variant. Nil (all zeros) and Max (all ones) are reported as such, and a UUID whose variant is not RFC 9562 has no version to report.

### How do I read the timestamp inside a UUID?

For version 7 the first 12 hex digits are Unix milliseconds: 017F22E279B0 is 1645557742000, which is 2022-02-22T19:22:22.000Z. Versions 1 and 6 count 100-nanosecond ticks since 1582-10-15 instead; the version 1 example C232AB00-9414-11EC-B3C8-9F6BDECED846 decodes to 2022-02-22T19:22:22.0000000Z. The inspector does both and shows the time in UTC. Versions 3, 4, 5 and 8 contain no time.

### Do v7 UUIDs made in the same millisecond stay in order?

Yes. After the first UUID in a millisecond the generator adds one to the random part for each further UUID, so a batch is strictly increasing (for example 018bcfe5-6800-7000-8000-000000000000 then 018bcfe5-6800-7000-8000-000000000001). Presses of the generate button on this page stay in order too, even if the clock steps back.

### Which format should I use: hyphens, uppercase or braces?

The standard text form is lowercase with hyphens, and it is the form RFC 9562 specifies for output. Parsers accept either case. Use no hyphens for compact keys and file names, uppercase or braces only where a system such as the Windows registry or a .NET GUID expects them. The table above shows each form.

### Is a GUID the same as a UUID?

Yes. GUID (globally unique identifier) is the name Microsoft uses for the same 128-bit value, and the two are interchangeable. Windows and .NET often print a GUID in uppercase and sometimes in braces, which the format options here reproduce. A version 4 GUID is a version 4 UUID.

### How long is a UUID, and how many are there?

A UUID is 128 bits, which is 16 bytes. As text it is 36 characters with hyphens (919108f7-52d1-4320-9bac-f847db4148a8) and 32 without. Six bits are fixed by the version and the variant, so version 4 can take 5,316,911,983,139,663,491,615,228,241,121,378,304 different values (2^122).

### Which UUID version should I use?

Use version 4 when you only need a unique value and no ordering. Use version 7 for database keys and anything you want sorted by creation time; RFC 9562 recommends it over versions 1 and 6 where possible. Version 1 also carries a node ID that can be a hardware address, which is a reason to avoid it for public identifiers. Versions 3 and 5 hash a name, so the same name always gives the same UUID; this page does not generate them.

### How do I generate a UUID in code?

In a browser or in Node.js, crypto.randomUUID() returns a version 4 UUID. Python has uuid.uuid4() in its standard library, and PostgreSQL has gen_random_uuid(). All of them use a cryptographically secure random source. For version 7, use a library or your database’s function if it has one, or generate a batch here.

### What is the all-zero UUID?

The Nil UUID, 00000000-0000-0000-0000-000000000000, is defined in RFC 9562 as a special value meaning no UUID, for example an empty field. Its counterpart is the Max UUID, with every bit set to one. Neither has a version, and the inspector reports each by name.

### Should a UUID be stored as text or as binary?

Binary is smaller: 16 bytes against 36 characters, and it compares faster. Databases with a native uuid type, such as PostgreSQL, store the 16 bytes for you and still print the hyphenated form. Use a text column only where a native type is not available.

### Are my UUIDs sent anywhere?

No. They are made in your browser and the inspector reads only what you type; nothing is sent or stored. The page counts only that the generate, copy or inspect buttons were used, never a UUID.

## Sources

- [RFC 9562: Universally Unique IDentifiers (UUIDs), IETF](https://datatracker.ietf.org/doc/html/rfc9562)
- [RFC 9562 §5.4: UUID Version 4](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4)
- [RFC 9562 §5.7: UUID Version 7](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-7)
- [uuid module, Python standard library documentation](https://docs.python.org/3/library/uuid.html)
- [UUID type and gen_random_uuid(), PostgreSQL documentation](https://www.postgresql.org/docs/current/datatype-uuid.html)
- [Crypto.randomUUID(), MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID)
- [Crypto.getRandomValues(), MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)

---

Cite as: UUID Generator, ponderloop, https://ponderloop.com/tools/uuid-generator/, updated 2026-10-07
