UUID generator
Generate UUID v4 identifiers locally.
How to use
Choose how many identifiers you need, from 1 to 100 (5 by default), and Generate creates version 4 UUIDs with the browser’s built-in crypto.randomUUID(). Copy puts the whole list on the clipboard, one per line.
A version 4 UUID is 128 bits written as 32 hexadecimal digits in the familiar 8-4-4-4-12 shape, 36 characters with the hyphens. Six of those bits are fixed: the 13th character is always 4, which marks the version, and the 17th is always 8, 9, a or b, which marks the variant. The other 122 bits are random.
Because the randomness comes from a cryptographic source, the identifiers are safe to use as real keys rather than as filler. Version 4 carries no timestamp and no machine identifier, which is the point: nothing about where or when it was created leaks.
The cost is that they do not sort in creation order, so as a database primary key they scatter new rows across the index. UUID version 7, defined in RFC 9562, puts a timestamp first for exactly that reason. The identifiers are generated in your browser and not recorded anywhere.
Example
Generates five random UUID v4 identifiers, one per line. They are identifiers, not passwords.
One identifier36 characters, for example 3f6c2a9e-8b1d-4c57-a0e2-9d4b6f1c7a35, in lowercase.Fifty at onceEach one drawn independently from the same source.The 13th characterAlways 4: it is what marks the version.The 17th characterAlways 8, 9, a or b: the variant defined by the standard.
Frequently asked questions
Could two of these ever collide?
With 122 random bits the chance is negligible: you would have to generate about a billion per second for 85 years before a collision became even odds. That only holds because the values come from a cryptographic source rather than Math.random.
Should I use a UUID as a database primary key?
It works, but random UUIDs fragment an index because every insert lands on a different page. Where write throughput matters, a time-ordered identifier such as UUID version 7 keeps the ordering and stays unique.
Is a GUID the same thing?
Yes. GUID is Microsoft’s name for the same 128-bit format; some tools show it in uppercase or between braces, but the value is the same.
Can a UUID be used as a secret token?
It is unpredictable, but it was not designed as a secret: it often ends up in URLs and logs. For tokens that grant access, use a dedicated random token with more bits and treat it as a password.