About the UUID Generator
This UUID generator creates universally unique identifiers in your browser. Version 4 UUIDs are 122 bits of randomness and are the default choice for database keys, request IDs and file names. Version 7 UUIDs put a millisecond Unix timestamp in the first 48 bits, so they sort in creation order — which keeps B-tree indexes compact; RFC 9562 recommends it over the older time-based versions 1 and 6, and it is a strong default for new database primary keys. You can generate one or up to 500 at a time, in lowercase or uppercase, with or without hyphens, or wrapped in braces the way Microsoft GUIDs are usually written.
Paste an existing UUID into the validator to check that it is well-formed and see its version and variant. For time-based UUIDs (versions 1, 6 and 7) the tool also decodes the embedded timestamp, which is handy when you are debugging logs or checking when a record was created.
Randomness comes from the Web Crypto API (crypto.getRandomValues), and nothing is sent to a server. If you type a seed, the random part becomes repeatable — useful for fixtures and tests, but never use seeded UUIDs where unpredictability matters.
How to use the uuid generator
- 1Choose version 4 for random IDs or version 7 for IDs that sort by creation time.
- 2Set how many UUIDs you need (up to 500).
- 3Pick the format: hyphens, uppercase, or braces for Windows/.NET GUIDs.
- 4Copy the list with the copy button.
- 5To check an existing ID, paste it into the validator to see its version and timestamp.
Formula and method
A UUID is a 128-bit number written as 32 hexadecimal digits in groups of 8-4-4-4-12. Four bits (the first digit of the third group) hold the version and two bits (the start of the fourth group) hold the variant, which is binary 10 for standard RFC 9562 UUIDs — so that digit is always 8, 9, a or b.
Version 4 fills the other 122 bits with cryptographically secure random data. Version 7 stores the Unix time in milliseconds in the first 48 bits and fills the remaining 74 bits with random data, so values created later sort after earlier ones. The validator reads the version and variant nibbles and, for time-based versions, converts the timestamp field back to a UTC date.
- M
- Version digit (13th hex digit): 4 for random, 7 for time-ordered
- N
- Variant digit (17th hex digit): 8, 9, a or b for RFC 9562 UUIDs
Worked examples
Ten standard v4 UUIDs
Ten random version 4 UUIDs are generated, one per line. Each is 32 hex digits plus 4 hyphens = 36 characters, and the 13th digit of every one is 4.
Compact GUIDs for a .NET project
Removing the hyphens leaves 32 hex digits; the two braces bring each GUID to 34 characters, e.g. {3F2504E04F8941D39A0C0305E82C3301}.
Validate and decode a v7 UUID
The 13th digit is 7 and the 17th digit is 8, so this is an RFC 9562 version 7 UUID. Its first 12 hex digits, 0x019200000000 = 1,726,576,852,992 ms since 1970, decode to 17 September 2024 at 12:40:52.992 UTC.
Validate a classic v1 UUID
Version 1 stores a 60-bit count of 100-nanosecond intervals since 15 October 1582, split across the first three groups. Reassembling 1ec9414c232ab00 and converting to Unix time gives 22 February 2022, 19:22:22 UTC.
Frequently asked questions
What is the difference between a UUID and a GUID?+
They are the same thing. GUID (globally unique identifier) is Microsoft’s name for a UUID; GUIDs are often written in uppercase and wrapped in braces, but the 128-bit format is identical.
Should I use UUID v4 or v7?+
Use v7 for database primary keys: its time-ordered prefix keeps index inserts sequential and fast. Use v4 when you do not want the ID to reveal when it was created, such as public tokens or file names.
Can two UUIDs ever be the same?+
In theory yes, in practice no. A v4 UUID has 122 random bits, so you would need to generate about 2.7 × 10^18 of them to reach a 50% chance of one duplicate.
Are these UUIDs safe to use as secrets?+
Unseeded v4 UUIDs come from the browser’s cryptographically secure generator, but UUIDs are designed to be unique, not secret. For passwords or API keys use a dedicated random token with more entropy.
How do I tell which version a UUID is?+
Look at the first digit of the third group: in 550e8400-e29b-41d4-a716-446655440000 it is 4, so it is a version 4 UUID. The validator above reads it for you and also checks the variant digit.