A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits in the pattern 8-4-4-4-12, used to label things uniquely without a central authority handing out IDs. The tool above generates them in your browser: pick version 4 or version 7, choose how many you want, optionally uppercase them or strip the hyphens, then copy or download the list. Nothing you generate is transmitted anywhere.
What is a UUID?
A UUID looks like f47ac10b-58cc-4372-a567-0e02b2c3d479. It is defined by RFC 9562 (which replaced the older RFC 4122) and is designed so that anyone, on any machine, can mint an identifier that is unique across space and time without coordinating with anyone else. That property makes UUIDs the default choice for primary keys in distributed systems, message and request IDs, file names, and any situation where two independent parties must each create IDs that will never clash when the data is later merged.
The two visible metadata fields are the version (the first hex digit of the third group — 4 or 7 here) and the variant (encoded in the first bits of the fourth group). Everything else is either random or, for v7, a timestamp.
Version 4: random
Version 4 fills the identifier with 122 random bits, leaving only the six version and variant bits fixed. This tool draws those bits from the browser’s cryptographically secure generator, so the output is unpredictable, not merely “random-looking”. With 122 bits of entropy the chance of ever seeing the same value twice is negligible, which is why v4 is the workhorse for opaque identifiers where you never need to sort or decode them.
Version 7: time-ordered
Version 7 is the modern answer to a long-standing problem with v4. Its first 48 bits are the Unix timestamp in milliseconds, big-endian, followed by the version and variant bits and then random data. Because the timestamp sits at the front, sorting v7 UUIDs as text also sorts them by creation time.
That single change matters a great deal for databases. When you use random v4 values as a primary key, each insert lands at a random spot in the index, scattering writes and fragmenting the underlying B-tree. Time-ordered v7 values instead cluster new rows together at the “end” of the index — you keep the decentralised, collision-resistant nature of a UUID while getting insert performance close to a plain auto-increment key. The trade-off is that a v7 UUID reveals roughly when it was created, so avoid it where that timing is sensitive.
v4 vs v7 at a glance
| Property | Version 4 | Version 7 |
|---|---|---|
| Composition | 122 random bits | 48-bit timestamp + 74 random bits |
| Sortable by time | No | Yes |
| Reveals creation time | No | Yes |
| Good database key | Workable, fragments index | Recommended, index-friendly |
| Best for | Opaque IDs, tokens, file names | Primary keys, event and log IDs |
Common use cases
- Primary keys for rows created across many services that must not collide when merged.
- Correlation and request IDs threaded through logs and traces.
- Idempotency keys so a retried API call is only processed once.
- Unique file names, upload tokens, and session identifiers.
Formatting notes
UUIDs are case-insensitive and the hyphens are only visual grouping, so the uppercase and no-hyphen options above change how the value is displayed, not the value itself. Many databases store a UUID compactly as 16 raw bytes; the hyphenated lowercase string is simply the canonical text form. If you compare UUIDs from different sources, normalise case and remove hyphens first.
Is it safe to generate secrets here?
These UUIDs are generated entirely on your device. There is no server round-trip, no logging, and no third-party analytics on this page, so the values are yours alone. Do keep in mind that a UUID is an identifier, not a secret: it has a fixed, partly predictable structure and should not be used in place of a properly generated password or API token. For those, reach for a dedicated generator that gives you the character set and entropy you need. This tool runs completely in the browser and keeps working even if you go offline after the page loads.