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
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
| 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
| 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
| 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 |
Where the 128 bits go
| 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
| 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 to generate UUIDs
- 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.
- Choose how many. Enter a count from 1 to 1,000. The list updates as you change it.
- Set the format. Tick uppercase, no hyphens or braces to match what your system expects, for example {919108F752D143209BACF847DB4148A8} for all three together.
- Copy all. Press Copy all to put the list, one UUID per line, on your clipboard. Generate new makes a fresh list.
- 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
More free tools
- Password GeneratorMake a strong random password or passphrase on your device: choose length and characters, see its strength in bits and copy it. Nothing is sent.
- Hash GeneratorHash text or a file with SHA-256, SHA-1, SHA-384, SHA-512, MD5 and CRC32, add an HMAC key, and check a checksum. Runs in your browser; nothing is uploaded.
- Unix Timestamp ConverterConvert a Unix timestamp to a date and a date to a timestamp. Seconds to nanoseconds, any time zone, plus a live counter of the current Unix time.
- Random Number GeneratorPick a random number between any two numbers, draw several with or without repeats, flip a coin or roll dice. Fair, unbiased and drawn on your device.
- Password Strength CheckerCheck how strong your password is: a 0–4 score, crack times, and the patterns that weaken it, with tips to fix them. Checked on your device, never sent.
- Barcode GeneratorMake Code 128, EAN-13, UPC-A, EAN-8 and Code 39 barcodes with check digits and quiet zones. Download PNG or SVG at your size and DPI. Made on your device.