About UUID Generator
Create universally unique identifiers for database keys, request ids, file names and test fixtures. Choose version 4 for purely random ids, or version 7 when you want ids that sort by creation time and index well in databases.
Every id is built from the browser’s cryptographic random source, and you can generate up to 500 in one go.
How it works
- A version 4 UUID is 122 random bits plus six fixed bits that mark the version and variant.
- A version 7 UUID starts with the current time in milliseconds. A 12-bit counter follows, so that ids made within the same millisecond on this page still sort in the order they were created, and then 62 random bits.
- Randomness comes from crypto.getRandomValues, the same source browsers use for encryption keys.
Questions
Can two generated UUIDs ever collide?
In theory yes, in practice no. You would need to generate about a billion version 4 UUIDs every second for decades before a single collision became likely.
Should I pick v4 or v7?
Use v7 for database primary keys, because time-ordered ids keep indexes compact and inserts fast. Use v4 when an id must not reveal when it was created.
Is a GUID the same thing?
Yes. GUID is the name Microsoft uses for the same 128-bit identifier. Turn on uppercase and braces if a Windows tool expects that style.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.