What is a UUID?
A UUID (universally unique identifier), also called a GUID on Microsoft platforms, is a 128-bit value written as 32 hexadecimal digits in five groups, like f47ac10b-58cc-4372-a567-0e02b2c3d479. UUIDs let separate systems create identifiers independently, without a central counter, with practically no risk of two ever being the same. They are used as database keys, API request IDs, file names, session tokens and message IDs.
- Version 4 is made of 122 random bits. It is the most widely used type.
- Version 7, standardized in RFC 9562 (2024), starts with a 48-bit Unix timestamp in milliseconds followed by random bits. Because v7 IDs sort by creation time, they keep database indexes compact and fast, which makes them a better choice for primary keys.
How to use the UUID generator
- Choose v4 or v7.
- Enter how many you need, from 1 to 1,000.
- Pick a format: uppercase, without hyphens, or wrapped in braces for Windows registry and .NET style.
- Copy the list or download it as a text file. Click Generate new for a fresh batch.
- To check an existing value, paste it into Validate a UUID. Version 7 UUIDs also show their creation time.
How the UUIDs are generated
Random bits come from your browser's cryptographically secure generator (crypto.getRandomValues), the same source used for encryption keys. The generator then sets the version digit (the first digit of the third group: 4 or 7) and the variant bits (the first digit of the fourth group is 8, 9, a or b), exactly as the standard requires.
For version 4 the chance of a collision is astronomically small: you would need to generate about a billion UUIDs every second for 85 years to reach a 50% chance of a single duplicate.
Examples
- v4:
3b241101-e2bb-4255-8caf-4136c566a962 - v7:
01929f3c-5e1a-7c4d-9b3e-2f6a8d0c1e47(the first 12 digits encode the timestamp) - Uppercase without hyphens:
3B241101E2BB42558CAF4136C566A962
More worked examples
Database keys: v7 UUIDs generated a few milliseconds apart sort in creation order, which keeps B-tree indexes compact compared with random v4 keys.
Common mistakes to avoid
- Using UUIDs as secrets. They are identifiers, not passwords; use the password generator for secrets.
- Storing them as text in large tables. Many databases have a native 16-byte UUID type.
- Exposing creation times by accident. v7 UUIDs reveal when they were created; use v4 if that matters.
Sources and methodology
The calculations on this page follow these published standards and references. The code is covered by automated tests against known values.