Version 4 is fully random. Version 7 starts with the current time, so new IDs sort after old ones, which keeps database indexes fast.
Generators
UUID Generator
Create UUIDs in bulk, random or time-ordered, in the format your code expects. Paste any UUID to see what version it is and when it was made.
Loading the tool…
The right kind of ID, in the right shape.
UUIDs identify records without a central counter, so they are used for database keys, request IDs, file names, and test data.
Choose uppercase or lowercase, with or without hyphens, wrapped in braces or quotes, and listed one per line, comma separated, or as a JSON array.
Paste a UUID to see its version and variant, and for versions 1 and 7 the exact time it was created.
Frequently asked questions
Can two UUIDs ever be the same?
In theory yes, in practice no. A random version 4 UUID has 122 random bits, so you would need to generate billions per second for many years to have a realistic chance of a repeat.
Should I use version 4 or version 7?
Use version 4 when you only need a unique ID. Use version 7 for database primary keys, because time-ordered IDs insert in sequence and keep indexes compact.
Are these UUIDs secure enough to use as secrets?
They come from a cryptographically secure source, but a UUID is meant to be unique, not secret. Version 7 also reveals when it was created, so do not use either as a password or access token.
Why does version 7 include the time?
The first 48 bits are a Unix timestamp in milliseconds. That is what makes the IDs sortable by creation time, and it is why you can read the creation time back out.
