About UUID generator
A UUID is a 128-bit identifier you can generate anywhere without asking a central authority whether it is taken. That property is what makes it useful: two services on opposite sides of a network can each mint identifiers with no coordination and effectively never collide.
Version 4 is 122 random bits. It is the default and the right choice for most things. The randomness here comes from the browser's cryptographic generator, not `Math.random`, so the values are unpredictable as well as unique. The collision probability is small enough to ignore — you would need to generate billions before it became worth thinking about.
Version 7 replaces the leading bits with a millisecond timestamp, so UUIDs sort in the order they were created. This matters more than it sounds if you are using UUIDs as database primary keys. A v4 key lands at a random position in the index on every insert, which fragments B-tree pages and steadily degrades write performance on large tables. A v7 key always appends at the end, behaving like an auto-increment while keeping the decentralised-generation property. If you are choosing a primary key type for a new table today, v7 is usually the better answer.
The trade is that v7 leaks creation time. Anyone holding the identifier can read the millisecond it was minted, which is fine for internal records and a genuine information leak for something like a password-reset token. Use v4 where the identifier is exposed to users and the timing should not be.
Bulk generation is capped at 10,000 per run, which is enough to seed a test fixture or backfill a column. Output is one per line, ready to paste into a SQL insert or a CSV.
Everything is generated locally. That is worth stating plainly because a UUID from a server you do not control is a UUID that server has seen — fine for throwaway values, not fine for anything acting as a secret or a key.
Questions
Should I use v4 or v7?
v7 if the UUID is a database primary key — it sorts chronologically and avoids index fragmentation on insert. v4 if the value is user-visible and you do not want to leak creation time.
Are these actually random?
Yes. They use the browser cryptographic random source, not Math.random. v4 is 122 random bits; v7 keeps 74 random bits alongside the timestamp.
Can UUIDs collide?
In principle, but the probability is negligible at any realistic volume. You would need to generate on the order of a billion v4 UUIDs before collision risk became worth designing around.
Is anything sent to your server?
No. Generation happens entirely in your browser. A UUID generated remotely is one the remote server has seen, which matters if you are using it as a token.