UUID generator
Make one or hundreds of UUIDs. Pick random v4 or time-ordered v7, and paste any UUID to inspect it.
Inspect a UUID
Choosing a UUID version
UUIDs identify records without a central counter. Random v4 UUIDs are the long-time default, but because they are random, inserting them into a database index scatters writes across the whole index. Version 7 puts a Unix millisecond timestamp in the first 48 bits, so new IDs land at the end of the index like an auto-increment key while staying globally unique.
The inspector reads the version nibble and, for v7, decodes the embedded creation time.
Frequently asked questions
What is the difference between UUID v4 and v7?
v4 is fully random. v7 starts with a millisecond timestamp, so UUIDs sort by creation time, which keeps database indexes compact and fast. Prefer v7 for primary keys.
How do I generate a UUID in Java?
UUID.randomUUID() gives a v4. The JDK has no built-in v7 generator, so use a library such as java-uuid-generator or uuid-creator for v7.
Can two UUIDs collide?
In practice no. A random v4 has 122 random bits, so a collision is astronomically unlikely.
Are these generated securely?
Yes. They use the browser's cryptographic random number generator and are created locally. In one v7 batch the timestamps advance one millisecond per UUID so the list stays sorted, so a large batch runs a few hundred milliseconds ahead of the clock.