UUID & Random Number Generator
Guide: UUID, ULID and NanoID: Which Unique ID Should You Use?
Nothing you enter or choose here leaves your device. This tool runs in your browser.
What a UUID looks like
A UUID is a 128-bit identifier, written as 32 hexadecimal characters in five groups: 8, 4, 4, 4 and 12. The third group begins with the version number, and the fourth begins with a variant character:
550e8400-e29b-41d4-a716-446655440000
^ ^
| variant (8, 9, a or b)
version 4That's a version 4 UUID: the 4 at the start of the third group marks it, and the a at the start of the fourth is the variant. Seeing those characters is a quick way to tell which kind of UUID you're holding.
Version 4 or version 7?
| Version 4 | Version 7 | |
|---|---|---|
| Made from | 122 random bits | A millisecond timestamp, then random bits |
| Sorts by creation time | No | Yes |
| Reveals when it was made | No | Yes, anyone can read the time |
| Good for | Public ids, tokens that need no pattern | Database primary keys |
Random version 4 ids land all over a database index, so inserts scatter and the index grows unevenly. Version 7 ids start with the time, so new rows are added at the end, which is friendlier to the database. The cost is that the id gives away roughly when the row was created. If that matters, use version 4.
Can two UUIDs collide?
In theory yes, in practice no. With 122 random bits, you'd need to generate about 2.7 quintillion version 4 UUIDs before the chance of a single duplicate reached 50 percent. A system making a billion a second would take about 85 years to get there. Bugs in your own code are far more likely than a genuine collision.
What a UUID isn't
- Not a secret. A UUID identifies something. Don't use it as a password or the only thing protecting a private link.
- Not guaranteed unguessable. Version 7 is partly predictable by design, and even version 4 depends on the random source being good. This tool uses your browser's secure one.
- Not sortable in version 4. Don't rely on order.
The random number side
The page also gives random numbers in a range you set, with an option for no repeats. They come from the same secure source. For a fuller set of options, such as decimals and sorting, try the random number generator.
If you need other kinds of identifier, such as sortable short ids, the ID generator makes ULIDs and similar. To fingerprint content instead of labeling it, use the hash generator, and the guide to UUID, ULID and nanoid compares the options.
Written by Akinrinmade Michael · Updated October 24, 2026
How to use
- 1Choose UUID or Random numbers.
- 2For UUIDs, pick a version and how many. For numbers, set a minimum, maximum and how many.
- 3Turn on "No repeats" if every random number must be different.
- 4Click Copy to copy the results.
Frequently asked questions
What is the difference between UUID v4 and v7?
Version 4 is completely random. Version 7 starts with a timestamp, so UUIDs sort by creation time, which is friendlier to database indexes.
Can two UUIDs be the same?
In practice no. A random UUID has 122 random bits, so the chance of a collision is astronomically small.
Are the random numbers really random?
They come from your browser's cryptographically secure random generator, the same source used for the password generator, with no bias between values.
Can I use these for passwords or tokens?
UUIDs identify things and aren't meant to be secret. For passwords use the password generator.
Read the guides
Learn how this works and how to get the most from it.
Developer
UUID, ULID and NanoID: Which Unique ID Should You Use?
How UUID v4, UUID v7, ULID and NanoID differ, why sortable IDs help databases, and how to pick the right one for your project.
3 min read
Security
How to Create a Strong Password (and Keep It Safe)
Why length beats complexity, how long a password should be, how passphrases work and how developers should store passwords.
4 min read
Developer
How Random Number Generators Work and Why Fair Picks Matter
The difference between ordinary and secure randomness, how to pick fairly without repeats, and what dice and coins really do.
3 min read
Related tools
ULID & NanoID Generator
Make sortable ULIDs and short random NanoIDs.
Random Number Generator
Pick random numbers in any range. No repeats and decimals.
Dice Roller & Coin Flip
Roll one to six dice, or flip a coin. Game dice too.
Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes and HMACs.