UUID v4 generator
Creates version 4 UUIDs as defined in RFC 9562, suited to database keys, file names and any identifier that must not repeat.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter how many, uppercase, include hyphens and wrap in { } braces.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
16 bytes from crypto.getRandomValues, then the top 4 bits of byte 7 are set to 0100 (version 4) and the top 2 bits of byte 9 to 10 (variant), leaving 122 random bits.
Example
Inputs: How many = 5, Uppercase = no, Include hyphens = yes, Wrap in { } braces = no. Result: UUIDs: 33c90b7d-8744-4753-bdd0-c935057e76ee e4f10aaa-be43-4943-8aba-5063c639f566 7f11bdee-73c3-4777-992a-8c36a75d39d7 34e04a66-a17c-4c5f-a3bc-a0ef905ad8cb 622db498-3d7f-47cc-b0fb-7a3b95a344e0; Count: 5; Random bits per UUID: 122.
Limits and caveats
- The ids are random and change on every recalculation, so copy what you need before changing options.
- UUID v4 is not time ordered; for database indexes that benefit from ordering, use UUID v7.
Questions about this tool
How likely is a UUID v4 collision?
With 122 random bits you would need about 2.7 quintillion ids for a 50% chance of a single repeat, which is negligible in practice.
Is a GUID the same as a UUID?
Yes, GUID is Microsoft's name for the same format, often written in uppercase inside braces, both options here.
Are these ids safe as secret tokens?
They come from a secure random source, but UUIDs tend to appear in URLs and logs, so secrets are better served by a dedicated longer token.
