Generate v4, v7 or v1 UUIDs in bulk — including the time-sortable v7 that makes a much better database key.
Ctrl + Enter to run
Produces version 4 UUIDs — 122 random bits from the browser's cryptographic random source. The point of a UUID is that several systems can mint identifiers independently, with no coordination, and not collide.
As a database primary key, random UUIDs have a cost worth knowing: they scatter inserts across a B-tree, which fragments clustered indexes badly on InnoDB and SQL Server. UUIDv7 keeps the coordination-free property while sorting by time, and a plain integer sequence still wins when only one database creates ids.