What is a UUID?
A UUID (universally unique identifier) is a 128-bit label written as 32 hex digits in five groups, like f47ac10b-58cc-4372-a567-0e02b2c3d479. Systems use them as database keys, request IDs and file names because two independent computers can create IDs without coordinating and still almost never collide.
Version 4: random
A v4 UUID has 122 random bits (the other six mark the version and variant). The chance of two random UUIDs matching is so small that you would need to generate billions per second for decades to expect a single duplicate. These are generated with your browser's cryptographic random number generator.
Good to know
- UUIDs are identifiers, not secrets - do not use them as passwords or access tokens unless the system is designed for it.
- Random UUIDs scatter in database indexes; newer time-ordered formats (UUID v7, ULID) can be faster for big tables.
Frequently asked questions
Are these truly random?
They use crypto.getRandomValues, the browser's secure random source.
What is the difference between a UUID and a GUID?
GUID is Microsoft's name for the same thing.
Can two UUIDs collide?
In theory yes, in practice no.