// when to use which
v4 is random. v7 is sortable.
v4 is what you reach for when uniqueness is the only requirement — user IDs, request IDs, idempotency keys. 122 random bits, 5.3×10^36 possible values, zero ordering.
v7 is what you reach for when you also want database-friendly insert order. The first 48 bits encode milliseconds since unix epoch, so v7 IDs sort lexicographically by creation time. This makes B-tree index inserts ~10× faster than v4 at scale because new rows append to the rightmost leaf instead of fragmenting across the tree.
Postgres, MySQL, and SQL Server all benefit from v7 over v4 as a primary key. SQLite is mostly indifferent. If you're stuck on v4 for legacy reasons but want partial ordering, prepend a unix timestamp to the column and index on (timestamp, uuid_v4) instead.
// frequently asked questions
Common questions about UUID Generator
What is the difference between UUID v4 and UUID v7?
UUID v4 is randomly generated with no embedded time data — every UUID is effectively random and has no natural sort order. UUID v7 is time-ordered: the first 48 bits encode a Unix timestamp in milliseconds, making v7 UUIDs sort chronologically. For database primary keys, v7 dramatically reduces B-tree index fragmentation compared to v4. If you are using Postgres, MySQL, or SQLite and inserting rows frequently, v7 is the better default choice as of RFC 9562 (2024).
When should I use v7 instead of v4?
Use v7 when UUID order matters for performance: database primary keys, event stream identifiers, log entry IDs, or any system where you want to page through records by creation time without a separate timestamp column. Use v4 when you need pure randomness with no time-correlation — for example, one-time tokens, reset links, or any identifier where predictability (even partial) is a security concern.
Does this tool send generated UUIDs to a server?
No. UUID generation uses the crypto.randomUUID() browser API (or a RFC 9562-compliant fallback). No network call is made. Bulk generation of 1,000 UUIDs happens entirely in-tab.
How is this different from uuidgenerator.net?
uuidgenerator.net generates on their server and transmits UUIDs back over HTTP. This is a minor concern for most use cases, but for applications where you are immediately assigning these UUIDs to sensitive records before storage, client-side generation removes one point of exposure. This tool also explicitly supports v7, which uuidgenerator.net does not prominently offer.
Can I generate UUIDs in bulk?
Yes. Enter a count and generate up to 10,000 UUIDs in one operation. Results are copyable as a plain list or JSON array.
Are the generated UUIDs cryptographically random?
For v4, yes — the generator uses window.crypto.getRandomValues() which is cryptographically secure in all modern browsers. For v7, the random portion (62 bits) is also cryptographically random; the timestamp portion is not random by design.