Skip to main content
ponderloop

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.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Generate UUIDs

Version

Format
Made on your device

This example is printed in the page itself, so do not use it. With JavaScript on, the page makes fresh UUIDs on this device.

Inspect a UUID

Valid UUID: version 7 (unix time, ordered)

Standard form
017f22e2-79b0-7cc3-98c4-dc0c0c07398f
Version
7: Unix time, ordered
Variant
RFC 9562 (bits 10xx)
Embedded timestamp (UTC)
2022-02-22T19:22:22.000Z
Unix time (milliseconds)
1645557742000

UUIDs are made with your browser’s Web Crypto random number generator and are never sent, saved or logged. A UUID identifies something; it is not a secret, so do not use one as a password or access token.

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.
VersionNameWhat it holdsEmbedded timestamp
1Gregorian time60-bit count of 100-nanosecond ticks since 1582-10-15, a clock sequence and a node IDYes
2DCE SecurityLike version 1, with a POSIX user or group ID replacing part of the time; not defined by RFC 9562No
3Name-based, MD5MD5 hash of a namespace UUID and a nameNo
4Random122 random bitsNo
5Name-based, SHA-1SHA-1 hash of a namespace UUID and a nameNo
6Reordered Gregorian timeVersion 1 with the time fields reordered so UUIDs sort by timeYes
7Unix time, ordered48-bit Unix millisecond timestamp followed by 74 random bitsYes
8Custom122 bits whose layout the application definesNo

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 bitsVariantMeaning
0xxxNCS backward compatibilityReserved for the old Apollo Network Computing System.
10xxRFC 9562The variant this standard defines, used by every UUID the tool generates.
110xMicrosoft (legacy GUID)Reserved for early Microsoft Windows GUIDs.
111xReserved for future definitionIncludes 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.
UUIDSourceVersionVariantTimestamp (UTC)
c232ab00-9414-11ec-b3c8-9f6bdeced846RFC 9562 §5.11: Gregorian timeRFC 95622022-02-22T19:22:22.0000000Z
919108f7-52d1-4320-9bac-f847db4148a8RFC 9562 §5.44: RandomRFC 9562None
017f22e2-79b0-7cc3-98c4-dc0c0c07398fRFC 9562 §5.77: Unix time, orderedRFC 95622022-02-22T19:22:22.000Z
00000000-0000-0000-0000-000000000000RFC 9562 §5.9Nil UUIDNCS backward compatibilityNone
ffffffff-ffff-ffff-ffff-ffffffffffffRFC 9562 §5.10Max UUIDReserved for future definitionNone

Where the 128 bits go

Both versions spend 6 bits on the version and variant, leaving 122 for the rest.
FieldVersion 4Version 7
Unix timestamp (milliseconds)0 bits48 bits
Version4 bits (0100)4 bits (0111)
Variant2 bits (10)2 bits (10)
Random122 bits74 bits
Total128 bits128 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).
FormatWhere you meet itWritten as
Lowercase with hyphensRFC 9562, JSON, most databases and APIs017f22e2-79b0-7cc3-98c4-dc0c0c07398f
Uppercase with hyphensSome Windows and .NET output017F22E2-79B0-7CC3-98C4-DC0C0C07398F
No hyphensCompact IDs and file names017f22e279b07cc398c4dc0c0c07398f
BracesWindows registry and COM GUIDs{017F22E2-79B0-7CC3-98C4-DC0C0C07398F}
URNXML, RDF and other places that need a URNurn:uuid:017f22e2-79b0-7cc3-98c4-dc0c0c07398f

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.

Frequently asked questions

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.
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.

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.

Sources

All toolsHome & DIY calculators