How it works
Each click asks the browser’s crypto.randomUUID() for a fresh version 4
UUID: 122 bits of cryptographically secure randomness formatted as
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where the 4 marks the version and
y is fixed to one of four values by the UUID spec.
Why version 4
Version 4 UUIDs are pure randomness with no embedded timestamp, MAC address, or counter, which makes them safe to generate offline with no coordination and no way to trace one back to when or where it was created. That is what almost everything asking for “a UUID” today means.
Uniqueness in practice
The chance of two random version 4 UUIDs ever colliding is astronomically small: even generating a billion per second, it would take about 85 years of continuous generation before the odds of a single collision reached 50%.