How to use the UUID generator
- Choose Generate version 4 for random UUIDs, or Generate version 7 for UUIDs that sort by the time they were made.
- Set How many (up to 1,000) and the format: lowercase with hyphens, 32 digits without hyphens, in {braces} the way Windows and .NET write GUIDs, or as a URN (
urn:uuid:…). Tick Uppercase letters if your system expects them. - Press Copy to copy the whole list, one UUID per line, or Generate for a fresh set.
- To check a UUID you already have, choose Inspect or validate a UUID and paste it in any common form. You see whether it is well formed, its version and variant, and for version 1, 6 and 7 UUIDs the date and time it was created.
What a UUID is
A UUID (universally unique identifier) — Microsoft software calls it a GUID — is a 128-bit number written as 32 hexadecimal digits in groups of 8, 4, 4, 4 and 12. Anyone can create one without asking a central registry, and the chance of two colliding is so small that databases, APIs, file formats and operating systems use them as keys. The current standard is RFC 9562 (May 2024), which replaced RFC 4122.
Two places in every UUID are fixed. The 13th digit is the version, which says how the rest was made, and the 17th digit carries the variant: 8, 9, a or b for UUIDs of the RFC layout. That is why every version 4 UUID has the shape xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where y is 8, 9, a or b.
| Version | Made from | Sorts by time |
|---|---|---|
| 1 | Time in 100 ns steps since 1582, a clock sequence and a node ID (often the MAC address) | No |
| 3 and 5 | MD5 or SHA-1 hash of a namespace and a name: the same name always gives the same UUID | No |
| 4 | 122 random bits | No |
| 6 | Version 1’s fields, reordered so the time comes first | Yes |
| 7 | 48-bit Unix time in milliseconds, then 74 random bits | Yes |
| 8 | A custom layout chosen by the software that makes it | — |
Version 4 or version 7?
Version 4 is the classic choice: entirely random, it reveals nothing about when or where it was made. Its weak spot is the database index. Random keys land all over a B-tree, so each insert touches a different page, and large tables grow slower and fragmented. Version 7 starts with the current time, so new rows go to the end of the index, much like an auto-increment number — while still being unique across servers that never talk to each other. RFC 9562 recommends version 7 for new systems that need time-ordered IDs.
The trade-off is that a version 7 UUID tells anyone who sees it when it was created, to the millisecond. That is harmless for most records, but choose version 4 when the creation time is itself private — for example in a public link that shouldn’t reveal when an account was opened. Within a single millisecond, this generator treats the 74 random bits as a counter that grows by a random step (RFC 9562 §6.2, method 2), so a batch of 1,000 stays in strict creation order and is still unguessable.
Why there is no version 1 option
Version 1 UUIDs contain the creator’s network card address and the exact time, which turned out to be a privacy problem: in 1999, identifiers that Microsoft Office wrote into documents helped link the Melissa virus to its author. A web page can’t read your MAC address anyway, so a browser-made version 1 UUID would need a random node ID — and version 7 already does that job better, with a timestamp that sorts. The inspect mode still decodes version 1 and version 6 UUIDs you paste.
Worked example: reading the date in a UUID
RFC 9562’s example version 7 UUID is 017F22E2-79B0-7CC3-98C4-DC0C0C07398F. Its 13th digit, 7, is the version; the 17th, 9, puts it in the RFC variant. The first 12 digits, 017F22E279B0, are hexadecimal for 1,645,557,742,000 milliseconds since January 1, 1970 — 2022-02-22T19:22:22Z, which was 2:22:22 PM in New York. The RFC’s version 1 and version 6 examples hold the same moment as 138,648,505,420,000,000 intervals of 100 nanoseconds since October 15, 1582, the first day of the Gregorian calendar:
| UUID | Version | Created (UTC) |
|---|---|---|
017f22e2-79b0-7cc3-98c4-dc0c0c07398f | Version 7 | 2022-02-22T19:22:22Z |
c232ab00-9414-11ec-b3c8-9f6bdeced846 | Version 1 | 2022-02-22T19:22:22Z |
1ec9414c-232a-6b00-b3c8-9f6bdeced846 | Version 6 | 2022-02-22T19:22:22Z |
In version 1 the time is split into three pieces with the lowest bits first, so version 1 UUIDs don’t sort by time; version 6 puts the same bits in order.
How unlikely is a duplicate?
A version 4 UUID has 122 random bits, so there are 2122 — about 5.3 × 1036 — possible values. By the birthday problem, it takes about 2.7 × 1018 UUIDs before the chance of even one duplicate reaches 50%. Made at a billion per second, that is about 86 years of work. Among a billion UUIDs, the chance of any duplicate is about 1 in 1019. Real-world duplicates come from broken random number generators — an old library, or virtual machines cloned with the same random state — not from the math. This page uses crypto.getRandomValues, the browser’s cryptographically secure generator.
Formats and tips
- Case: RFC 9562 recommends lowercase output, and software should compare UUIDs without regard to case.
- Braces are how the Windows registry, COM and .NET’s
Guid.ToString("B")write GUIDs. URNs (urn:uuid:…) appear in XML and RDF. - Storage: keep UUIDs as 16 bytes — PostgreSQL’s
uuidtype,BINARY(16)in MySQL — rather than 36 characters of text. - In code: JavaScript
crypto.randomUUID(); Pythonuuid.uuid4(), anduuid.uuid7()from Python 3.14; PostgreSQLgen_random_uuid(), anduuidv7()from version 18; JavaUUID.randomUUID(); .NETGuid.NewGuid(), andGuid.CreateVersion7()from .NET 9. - For a secret rather than an ID, use the password generator. To turn a version 7 timestamp into other formats, paste its milliseconds into the epoch converter.
UUIDs are generated in your browser and never sent anywhere, and the page keeps no list of them.
Frequently asked questions
What is the difference between a UUID and a GUID?
None in practice. GUID (globally unique identifier) is Microsoft’s name for the same 128-bit identifier. GUIDs made by Windows and .NET today are version 4 UUIDs; they are often written in uppercase and in braces, such as {0F8FAD5B-D9CB-469F-A165-70867728950E}.
Is a version 4 UUID really unique?
Not guaranteed, but close enough for any real system: with 122 random bits, you would need about 2.7 × 1018 of them for a 50% chance of a single duplicate. Databases still put a unique constraint on UUID keys, which costs nothing and catches the rare bug in a random number generator.
Can I use a UUID as a password or a secret token?
Better not. RFC 9562 says software should not assume UUIDs are hard to guess, a version 7 UUID has only 74 random bits plus a readable timestamp, and some libraries use weak random numbers. For secrets, use a token made for the job, such as 32 random bytes in Base64, or the password generator.
How do I check whether a string is a valid UUID?
Paste it in Inspect or validate a UUID. In code, the regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ (case-insensitive) matches UUIDs of versions 1 to 8 in the standard variant; the nil and max UUIDs need their own check.
Should I use UUIDs as database primary keys?
They work well when IDs are created in many places — several servers, offline mobile apps — or must not reveal how many records exist. Prefer version 7 for primary keys, because time-ordered values keep the index compact, and store them in a native UUID or 16-byte binary column.
Last updated: October 16, 2026