
How to Use the UUID Generator

- Pick v4 for fully random IDs or v7 for time-ordered IDs that sort well as database keys.
- Enter how many UUIDs you need, up to 1,000 in one batch.
- Press Generate UUIDs, or Download .txt to save the whole list as a file.
- Paste any UUID here to check it is valid and read its version, variant and timestamp.
- Copy your new UUIDs from the list, one per line.
Choose v4 random or v7 time-ordered, enter how many identifiers you need and press Generate UUIDs. As a uuid v4 generator it can create a single value or a bulk list of up to 1,000.
The formatting options change the whole list instantly: uppercase letters, braces for Microsoft style GUIDs, or no hyphens for compact 32 character IDs. Copy the list, or download it as a plain text file instead.
Everything is created in your browser with a secure random source, so no identifiers are sent to a server. Below the options, the validator checks any UUID you paste and reads its version and timestamp.
What a UUID Is
A UUID, or universally unique identifier, is a 128-bit value that any system can create without asking any central registry first. It lets separate computers and services label records without coordinating with each other directly.
It is written as 32 hexadecimal digits split into five separate groups, neatly following the 8-4-4-4-12 pattern. With the four hyphens added, the standard text form is 36 characters long, as in this example: 550e8400-e29b-41d4-a716-446655440000.
The current standard is RFC 9562, published by the Internet Engineering Task Force in 2024. It replaced RFC 4122 and added versions 6, 7 and 8, while keeping every older version fully valid and supported.
Version 4 vs Version 7 UUIDs
Version 4 fills 122 random bits and fixes six bits for the version and variant. The values have no order and reveal nothing about when or where they were made, which suits public identifiers well.
Version 7 starts with a 48-bit Unix timestamp in milliseconds, followed by random bits. That makes the values time-ordered and sortable, so a list sorts by creation time with nothing more than simple text comparison.
Use v4 when an identifier should reveal nothing, and v7 when you need database keys that sort by time. Both are equally valid standard UUIDs, and any system that accepts one will accept the other.
| Feature | Version 4 | Version 7 |
|---|---|---|
| Built from | 122 random bits | 48-bit Unix time in ms + 74 random bits |
| Sort order | Random | Creation time |
| Database index friendly | Less, inserts scatter | Yes, new rows append |
| Reveals creation time | No | Yes, to the millisecond |
| Typical use | Tokens, public IDs | Primary keys, event logs |
Other UUID Versions
Version 1 combines a timestamp with the MAC address of the machine, which can reveal the device that created it. Version 6 reorders the same fields so the values sort by time like version 7.
Version 3 and version 5 are name based. They hash a namespace and a name with MD5 or SHA-1, so the same input always gives the same UUID. That deterministic behavior suits stable lookup keys.
Version 8 is reserved for custom layouts defined by an application. This generator focuses on versions 4 and 7, which cover almost every modern need, while the validator recognizes all of the defined versions too.
How UUIDs Are Built
In text form, the first digit of the third group is the version digit, 4 or 7 here. The fourth group starts with the variant, which is 8, 9, a or b for standard UUIDs.
M = version digit (4 or 7)
N = variant digit (8, 9, a or b)
For v4, this tool calls crypto.randomUUID wherever the browser supports that function. Otherwise it sets the version and variant bits itself and fills the remaining bits with secure random values from the Web Crypto API.
For v7, the next 12 bits after the timestamp act as a counter within the same millisecond. That keeps a bulk list of 1,000 v7 UUIDs in strictly increasing order, even when many share one.
Worked Example: Reading a Version 7 Timestamp
The validator below the options is pre-filled with the sample value given in RFC 9562, 017f22e2-79b0-7cc3-98c4-dc0c0c07398f. The version digit, which is the first character of the third group, is 7, so the value is time-ordered.
The first 12 hex digits, 017f22e279b0, equal 1,645,557,742,000 in decimal. Read as milliseconds since 1 January 1970 UTC, that is 22 February 2022 at 19:22:22 UTC, exactly matching the time stated in the RFC itself.
The fourth group starts with 9, which marks the standard variant. The validator performs these steps automatically, so you can paste a v7 key from your own database and see exactly when it was created.
Can Two UUIDs Be the Same?
In theory yes, but in practice it almost never happens. A v4 UUID has 2122 possible values, about 5.3 × 1036, so a collision between two independently generated values is extremely unlikely in practice.
You would need to generate roughly 2.7 × 1018 v4 UUIDs to reach a 50% chance of a single duplicate. That equals creating about one billion values every second, nonstop, for roughly 85 whole years.
The real risk comes from a weak random number generator or copied seeds, not from the UUID format. That is why this tool only uses the cryptographic source built into your browser rather than Math.random.
UUIDs as Database Primary Keys
A UUID primary key lets distributed systems create records on many servers and merge them together later without any clashes. It also hides how many rows a table holds, which sequential integer IDs can reveal.
Random v4 keys land all over a B-tree index, which causes page splits and slower inserts on large tables. Time-ordered v7 keys append near the end of the index, much like an auto increment column.
PostgreSQL has a native uuid data type that stores values in 16 bytes. In MySQL, storing values as BINARY(16) rather than a 36 character string saves space and keeps indexes smaller, which improves lookup speed.
Using the Validator and GUID Formats
Paste any UUID to check, with or without hyphens, braces or a urn:uuid: prefix. The validator checks the format, reads the version and variant, and shows the embedded timestamp for versions 1, 6 and 7.
It also recognizes the nil UUID, which is all zeros, and the max UUID, which is all ones. Anything with the wrong length or characters outside 0 to 9 and a to f is rejected.
GUID is the name Microsoft uses for the same 128-bit format, often shown in uppercase inside braces. Case does not change the value, although the standard recommends lowercase output when new systems generate fresh values.
Security Notes and Limits
A v4 value from a secure generator is hard to guess, so it can safely appear in session tokens. For high value secrets, a dedicated token with more random bits is still a better choice.
A v7 UUID exposes its creation time to anyone who reads it, and version 1 can expose a MAC address. Avoid both for identifiers that should not leak timing or device details to your users.
Name based versions are predictable by design, so never use version 3 or 5 as a secret. This tool produces identifiers only and stores nothing, so keep your own record of values you need later.
Frequently asked questions
What is the difference between a UUID and a GUID?
They are the same 128-bit identifier format. GUID is the name Microsoft uses, and GUIDs are often shown in uppercase inside curly braces. Use the Uppercase and Braces options to match that style.
Is UUID v4 truly random?
This generator uses the browser's cryptographically secure random source, so the 122 random bits are unpredictable. Six bits are fixed to mark the version and variant, which is why v4 values always contain a 4.
Should I use UUID v7 for database keys?
Often yes. Because v7 values start with a timestamp, new keys sort after older ones, which keeps B-tree indexes compact and inserts fast. Use v4 if the creation time must stay hidden.
How many UUIDs can I generate at once?
Up to 1,000 per click. You can copy them all at once or download them as a plain text file with one UUID per line, ready to paste into code, a spreadsheet or a database script.
Can I get the creation time from a UUID?
Yes for versions 1, 6 and 7, which contain a timestamp. Paste the UUID into the validator to see it in UTC. Version 4 contains no time information at all, only random bits.
Are UUIDs guaranteed to be unique?
Not strictly, but a collision is astronomically unlikely. You would need about 2.7 billion billion v4 values for a 50% chance of one duplicate, provided the generator uses a secure random source.