Works on this device
UUID Generator
Make a UUID in one step. Your browser makes it with its secure random generator, on your device. This page does not send or save it.
Choose your settings
Check these values
UUIDs are made in this browser. They are not sent to a server.
Your UUID will show here
Choose the button under the settings to make one.
Result
How it was worked out
How to use the UUID generator
- Choose what to do. Make random UUIDs (version 4) is the usual choice.
- Type how many you want, from 1 to 1,000, and choose how to write them: small letters, capital letters, no hyphens, in braces or as a URN.
- A new result shows each time you change an option. Choose Generate for fresh UUIDs.
- Choose Copy text to copy them, or Download as text file to save them, one on each line.
- To check a UUID that you already have, choose Check a UUID and read its version and paste it.
What a UUID is
A UUID (universally unique identifier) is a 128-bit number. It is written as 32 hexadecimal digits in groups of 8, 4, 4, 4 and 12, such as 017f22e2-79b0-7cc3-98c4-dc0c0c07398f. A GUID is the same thing under the name that Microsoft uses.
The first digit of the third group is the version. It says how the UUID was made. The first digit of the fourth group holds the variant. For the usual kind it is 8, 9, a or b. The current standard is RFC 9562, which replaced RFC 4122.
- Version 4 is random: 122 of the 128 bits come from a random generator. It needs no clock and no name, so it is the common choice.
- Version 7 starts with the time in milliseconds since 1970 (48 bits), then 74 random bits. UUIDs made later sort after UUIDs made earlier, which helps database indexes.
- Versions 1 and 6 hold a time and a node number. Versions 3 and 5 are made from a name. This page does not make these, but the checker reads them.
- The nil UUID has all bits 0 and stands for "no value". The max UUID has all bits 1.
Worked example
The UUID 017f22e2-79b0-7cc3-98c4-dc0c0c07398f is an example from RFC 9562. The third group starts with 7, so it is version 7. The fourth group starts with 9, so the variant is the usual one. The first 12 digits, 017f22e279b0, are the number 1,645,557,742,000 in hexadecimal: the time 2022-02-22 19:22:22 UTC in milliseconds.
A version 4 UUID such as 3f2b8c1e-9d4a-4f6b-8a2e-1c5d7e9f0a3b always has a 4 at the start of the third group, and 8, 9, a or b at the start of the fourth group. All other digits are random.
The same in code
These functions make a random (version 4) UUID, unless the table says something else.
| Language or system | How to make a UUID |
|---|---|
| JavaScript in browsers and Node.js | crypto.randomUUID() |
| Python | uuid.uuid4() |
| Java | java.util.UUID.randomUUID() |
| C# and .NET | Guid.NewGuid() |
| Ruby | SecureRandom.uuid |
| Go | uuid.New() from the package github.com/google/uuid |
| PHP | no built-in function; many projects use Uuid::uuid4() from the package ramsey/uuid |
| PostgreSQL 13 and later | gen_random_uuid() |
| PostgreSQL with the uuid-ossp extension | uuid_generate_v4() |
| SQL Server | NEWID() |
| MySQL and MariaDB | UUID(), which gives a version 1 UUID (time and node), not a random one |
| Linux and macOS command line | uuidgen |
Limits you should know
- Two random UUIDs can be the same by chance, but with 122 random bits this is very unlikely. The Random Identifier Generator estimates the chance for the number of identifiers you plan to make.
- A version 7 UUID shows its creation time to anyone who has it. The time comes from the clock of your device. UUIDs made in one batch share one time and are not put in order among themselves.
- The checker looks at the form of a UUID only. It cannot tell whether a UUID is in use, or who made it.
- The page does not make versions 1, 3, 5, 6 or 8, and it does not change the byte order of a GUID for a database.
- A UUID is an identifier, not a secret. Do not use one as a password.
- If your browser has no secure random generator, the tool stops and tells you. It never uses a weaker one.