How this tool works
A UUID is a 128-bit identifier written as thirty-two hexadecimal characters in five hyphenated groups. The version generated here is version 4, which is very nearly all random: no counter, no timestamp, no machine identifier, so two systems that have never communicated can each mint identifiers without any risk of collision worth planning for.
Randomness comes from the browser's cryptographic generator rather than from Math.random, which matters because Math.random is not unpredictable and identifiers derived from it can be guessed. Up to twenty are produced at a time.
Where UUIDs help and where they cost
- Collisions are not a practical concern: the space is large enough that generating billions of version 4 UUIDs leaves the chance of a repeat negligible. You do not need to check for duplicates.
- They are not secret: a UUID identifies something, it does not protect it. An unguessable identifier is not an access control, and anything reachable by URL alone needs a real permission check.
- They are poor primary keys in some databases: random values scatter writes across an index rather than appending to it, which fragments the index. Where that matters, a time-ordered variant is the usual answer.
- Case and hyphens are presentational: the same identifier may appear upper or lower case, with hyphens or without. Normalise before comparing, or matching will fail on identical values.