UUID Generator: Create Random Version 4 UUIDs
By TheToolsBank Editorial TeamLast updated:
How to generate UUIDs
- Enter how many UUIDs you want in How many? The default is 5 and the maximum is 100.
- Tick Uppercase if your system expects capital letters.
- Untick Include hyphens to get a 32-character string with no dashes.
- Click Generate.
- Copy a single UUID with the icon next to it, or click Copy all to copy the list, one UUID per line.
Changing Uppercase or hyphens reformats the current list without creating new IDs. Click Generate again for a fresh batch. Numbers above 100 are capped at 100.
What a version 4 UUID looks like
A UUID is 128 bits, shown as 32 hexadecimal digits (0 to 9, a to f) in groups of 8, 4, 4, 4 and 12. With four hyphens, that is 36 characters.
| Group | Example | What it holds |
|---|---|---|
| 1st (8 digits) | df1ff8af | Random |
| 2nd (4 digits) | bc9c | Random |
| 3rd (4 digits) | 41aa | First digit is always 4, the version |
| 4th (4 digits) | 9dd4 | First digit is always 8, 9, a or b, the variant |
| 5th (12 digits) | e8a234ecc1c7 | Random |
The fixed version and variant digits use 6 of the 128 bits, leaving 122 random bits.
Collision odds, with real numbers
There are 2^122, or about 5.3 × 10^36, possible version 4 UUIDs. Because of the birthday problem, duplicates become likely much sooner than that, but still at a scale few systems reach:
- You would need about 2.71 quintillion (2.71 × 10^18) UUIDs for a 50% chance of a single duplicate.
- At one billion UUIDs per second, reaching that point would take about 86 years.
- If you create one billion UUIDs in total, the chance of any duplicate is roughly 1 in 10 quintillion.
A repeated ID is far more likely to come from a bug, such as copying the same value twice, than from chance.
UUID versions: v1, v4 and v7
RFC 9562, published in 2024, replaced RFC 4122 as the UUID standard and added version 7. The version 4 format did not change, so UUIDs from this tool meet both, which is why the tool describes them as RFC 9562, formerly RFC 4122. This tool only makes version 4.
| Version | Built from | Sorts by creation time? | Good for |
|---|---|---|---|
| v1 | Timestamp plus a node ID, often a MAC address | Not as plain text | Older systems; can reveal the machine and time |
| v4 | 122 random bits | No | General-purpose IDs; the most widely used |
| v7 | Unix timestamp in milliseconds plus random bits | Yes | Database primary keys where insert order matters |
GUID vs UUID
A GUID (globally unique identifier) is Microsoft's name for the same 128-bit format, so a UUID from this page works anywhere a GUID is expected. Windows tools often show GUIDs in uppercase inside braces, like {DF1FF8AF-BC9C-41AA-9DD4-E8A234ECC1C7}. Tick Uppercase and add the braces yourself if needed.
The standard says to write UUIDs in lowercase but to read uppercase and lowercase as equal. For realistic sample records, try the Fake Data Generator. For a shorter random ID, use the Random String Generator.
Common Mistakes to Avoid
Using a UUID as a password-reset link or secret token
Solution:
Expecting version 4 UUIDs to sort in creation order
Solution:
Storing UUIDs as 36-character text in large tables
Solution:
Comparing UUIDs as case-sensitive strings
Solution:

