UUID Generator
Generate random UUIDs (version 4) using your browser's built-in cryptographically secure random number generator. Nothing is sent anywhere.
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit value, usually written as 32 hexadecimal characters in five hyphen-separated groups, designed so that two randomly generated UUIDs are astronomically unlikely to ever collide — no coordination between systems needed. This tool generates version 4 UUIDs, the fully-random variant, using crypto.randomUUID(), your browser's built-in cryptographically secure random number source.
Common uses
- Database primary keys and record IDs
- Unique request or trace IDs for logging and debugging
- Generating test data or placeholder identifiers
How a version 4 UUID is laid out
A UUID is written as 8-4-4-4-12 hexadecimal characters, for example 3f2b8c1e-9a4d-4e7b-b6a1-0c5d2f8e7a91. Of its 128 bits, 6 are fixed: the first character of the third group is always 4 (the version), and the first character of the fourth group is always 8, 9, a or b. That leaves 122 random bits, or about 5.3 × 10^36 possible values.
How unlikely is a collision?
Generating a billion UUIDs every second, you would need to run for roughly 86 years to reach a 50% chance of a single duplicate. For ordinary applications, from a few thousand to a few billion records, the risk is negligible, and it is usually far lower than the risk of a bug somewhere else in the system.
Practical notes
- You can generate 1 to 100 at once. The Uppercase option only changes how they are displayed; the value is the same.
- Fully random keys are inserted in random order, which can slow indexes on very large database tables. Time-ordered formats such as UUID version 7 (defined in RFC 9562) are designed for that case.
- A UUID is an identifier, not a secret. Don't use one as a password or as the only protection for a private link.
- Most databases and languages accept the hyphenated lowercase or uppercase form, but check whether yours expects braces or no hyphens.
Using the generated values
You can ask for between 1 and 100 UUIDs at a time, and changing the count creates a fresh set. Each one is 36 characters long: 32 hexadecimal digits and 4 hyphens. Copy All joins them with line breaks, so a full set of 100 comes to 3,699 characters (100 × 36 plus 99 breaks), ready to paste into a spreadsheet column or a seed script. The Uppercase option only changes how the letters are shown and copied, so 3f2b8c1e-9a4d-4e7b-b6a1-0c5d2f8e7a91 becomes 3F2B8C1E-9A4D-4E7B-B6A1-0C5D2F8E7A91, which most systems treat as the same value.
If a system stores UUIDs as text, remember that a hyphenated one takes 36 bytes, or 32 without the hyphens, while the same value as binary takes 16 bytes, which is why databases with a native UUID type are more compact. Random version 4 values have no order, so using them as the primary key of a very large table scatters new rows across the index; time-ordered identifiers are a better fit when insert speed matters. The generator needs a page served over HTTPS, since browsers only offer the random UUID function in a secure context.
Frequently asked questions
What's the chance of two UUIDs colliding?
For version 4 UUIDs, the chance is so small it's not a practical concern — you'd need to generate billions of them before a collision became even remotely likely.
Is my data sent anywhere?
No — every UUID is generated directly in your browser using crypto.randomUUID(), the Web Crypto API's built-in generator.
Which version of UUID does this create?
Version 4, where almost all of the 128 bits are random. It doesn't contain a timestamp, a MAC address or any information about your device.
Can I use a UUID as a database primary key?
Yes, and many systems do. The trade-off is that random keys aren't sorted by creation time, which can affect index performance on very large tables. Time-ordered UUID versions suit that case better.