FAQ
What is the difference between v4, v1 and v7?
v4 is fully random. v1 combines a timestamp with node information. v7 places the timestamp in the high bits so values sort by time, which is friendlier as a database primary key.
Can a generated UUID collide?
v4 has 122 random bits, so collisions are negligible in practice. For a real guarantee rely on a unique constraint rather than on probability.
Can I remove the hyphens?
Yes. The tool can drop hyphens, change case and wrap in braces depending on what your system expects.
About this tool
The three versions differ in more than "random versus sortable":
- v4: 122 random bits (6 bits are fixed for version and variant). It carries no timestamp or machine information.
- v1: a 60-bit timestamp at 100-nanosecond resolution counted from 1582, a 14-bit clock sequence and a 48-bit node. Here the node is random rather than a MAC address (so no hardware leaks) and stays stable for the page session; within one millisecond the timestamp advances by a single 100-nanosecond tick, so a batch comes out in generation order with no duplicates.
- v7: a 48-bit millisecond timestamp in the leading bits followed by randomness, so string order equals time order. Values created within the same millisecond have random relative order (there is no monotonic counter); use ULIDs or add your own sequence when strict ordering matters.
Up to 500 values per run. Generation is fast, but copying and pasting scales linearly, so generate what you need.
Format options stack: drop hyphens, then uppercase, then wrap in braces. Removing hyphens still leaves 32 hex characters; storing that as BINARY(16) rather than CHAR(36) halves the space and the index size.
A common mistake is using v4 as a MySQL clustered primary key. Random values insert all over the B+ tree, triggering repeated page splits and a visible write-throughput drop as the table grows. Switch to a time-ordered value such as v7, or store it as binary.