A UUID, universally unique identifier, is a 128-bit label designed so that identifiers generated independently, on different machines, at different times, by different teams, never collide. This tool generates UUID version 4 values in your browser: pick a batch size of 1, 5, 10, or 25, optionally switch to uppercase, and copy the whole list with one click. Everything happens locally using your browser's cryptographic random number generator, nothing is transmitted or stored, and the page works on mobile as well as desktop.
The reason UUIDs exist is a practical database and distributed-systems problem. Sequential integer IDs force every part of a system to coordinate: a central counter, a round trip to the database, a locking protocol. A UUIDv4 replaces that coordination with randomness so strong that the probability of two independently generated identifiers ever matching is, for any realistic workload, effectively zero. You can generate IDs offline, on a plane, in a distributed worker fleet, and merge everything later without a single conflict.
This page also explains what those random bits actually mean, how the collision math works with real numbers, and how version 4 relates to the other UUID versions you will encounter in the wild.
What a UUID Looks Like, Piece by Piece
A UUID is 32 hexadecimal digits displayed in the canonical 8-4-4-4-12 grouping, like this real generated example:
3f9a2c7e-81b4-4d6a-9e2f-5c8b1a7d3e60
Every character carries meaning in the version layout:
- The third group's first digit is the version. Here it is 4, marking a random UUID. You will see 1 for time-based, 3 and 5 for name-based, and increasingly 7 for the modern time-ordered format.
- The fourth group's first digit encodes the variant, telling parsers which specification family the UUID follows. Version 4 UUIDs show 8, 9, a, or b there.
- The remaining 122 bits are pure randomness, drawn from a cryptographically secure source.
- Length is always exactly 36 characters including the four hyphens, or 32 without them, which is convenient for validating input and sizing database columns.
How to Use This Tool (Step by Step)
- Choose how many UUIDs you need: 1, 5, 10, or 25 per batch. Generating 25 at once and trimming the list is usually faster than requesting them one at a time.
- Toggle uppercase if your target system expects it. The characters are identical in either case; hex digits a-f and A-F represent the same values, but some downstream systems are picky about formatting, so match their convention.
- Generate. The batch appears instantly, drawn fresh from the cryptographic random source every time.
- Use copy-all to grab the entire list, one UUID per line, ready to paste into a spreadsheet, seed file, or script.
- Generate another batch any time. Identifiers from separate runs are no more likely to collide than identifiers within one run, which is the whole design goal.
The Randomness and the Collision Math
Version 4 UUIDs reserve 6 of their 128 bits for version and variant markers, leaving 122 bits that vary randomly. That number sounds abstract until you put it in perspective: 122 bits is a space of 2 to the power 122, which is about 5,316,000,000,000,000,000,000,000,000,000,000,000, or roughly 5.3 x 10 to the 36th, possible values. Written out, more than five thousand billion billion billion billion.
Collisions follow a birthday-problem curve, and the honest numbers are striking:
- Generate 1 billion UUIDs per second, every second, and the expected time until the first collision is on the order of 100 years.
- Generate just 2.7 quintillion (2.7 x 10 to the 18th) UUIDs and the chance of even one duplicate is still only one in a billion.
- For a typical application generating thousands or millions of identifiers, the probability of any collision ever is so close to zero that it is not a design consideration at all.
The engineering conclusion: with a proper cryptographic random source, you never need to check whether a generated UUID already exists. That check is not wrong, just unnecessary, and removing it simplifies distributed workflows considerably.
Where the randomness comes from matters. This tool uses the browser's crypto.randomUUID function when available, backed by a cryptographically secure pseudorandom number generator seeded from your operating system's entropy pool, and falls back to crypto.getRandomValues, the same CSPRNG API, otherwise. Neither is a Math.random equivalent: Math.random is fast but predictable enough that its output can be reconstructed from a few observations, which makes it categorically wrong for identifiers where unpredictability matters, such as session tokens. A CSPRNG output resists prediction even given previous outputs.
UUID Versions at a Glance
| Version | Built from | Typical use |
|---|---|---|
| v1 | Timestamp plus MAC address | Legacy systems; leaks hardware identity and time |
| v3 | MD5 hash of a namespace and name | Deterministic IDs from names; MD5 is deprecated |
| v4 | 122 random bits | The default choice for almost everything |
| v5 | SHA-1 hash of a namespace and name | Deterministic IDs, same input always gives same output |
| v7 | Millisecond timestamp plus random bits | Modern time-ordered IDs that index well in databases |
Version 4 versus version 5 is the distinction worth remembering. V4 is random: the same input, generated twice, gives different outputs, which is what you want for entity identifiers. V5 is deterministic: hashing the same namespace and name always produces the same UUID, which is useful when independent systems must derive identical identifiers from a shared name without communicating, such as mapping a domain name to a fixed identifier. If you need reproducibility, you want v5, not v4; this tool generates v4, the general-purpose default.
Version 7 deserves a mention because databases pushed it into fashion. Random v4 values scatter across a B-tree index, causing page splits and cache misses at scale, so systems inserting millions of rows increasingly prefer v7, whose leading timestamp keeps new identifiers ordered, playing nicely with indexes while retaining random tail bits for uniqueness. If you control the UUID version choice in a high-write system, it is worth researching; for typical application volumes, v4 remains entirely fine.
Common Use Cases
- Database primary keys: UUIDs allow client-side ID generation, safe merging of data from multiple sources, and offline-first apps that sync later without conflicts.
- API request and trace identifiers: stamp every request with a UUID so logs across services can be correlated during debugging.
- File and object names: an uploaded file renamed to a UUID avoids filename collisions, path traversal problems, and leaking original names.
- Test fixtures and seeds: batches of identifiers for staging data, integration tests, and demo accounts, generated in one paste.
- Public-facing references: order numbers, share links, and confirmation codes where you prefer an unguessable identifier over a sequential count that reveals your volume.
One Honest Caveat: Unpredictability Is Not Secrecy
UUIDv4 identifiers are hard to guess, with a 1 in 5.3 x 10 to the 36th chance of hitting a specific value, and that property is genuinely useful for unguessable share links and reference codes. But an unguessable identifier is an authentication mechanism only if you treat it as a secret: it must travel over HTTPS, must not appear in logs or analytics URLs, and should not be the sole gate to sensitive data. Resources protected only by an unlisted UUID leak through referrer headers, browser history, and shared screenshots. Use UUIDs as identifiers first and unguessable tokens second, and keep real authorization behind accounts and permissions.
Tips and Best Practices
- Store UUIDs efficiently in databases: as a 16-byte binary or the native UUID column type rather than 36-character text, which cuts storage and speeds comparisons.
- Do not sort or parse UUID strings as numbers; they are opaque labels. Only v1 and v7 encode meaningful time, and even then, sorting rules differ.
- Validate external input with the canonical format: 36 characters, four hyphens at fixed positions, hex digits only, with the version and variant nibbles in range.
- For bulk seed data, generate the batch once, save it in version control, and reuse the same fixture list across test runs for reproducibility.
- When several systems must derive the same identifier from the same name independently, switch to a v5 tool rather than pre-generating and syncing v4 lists.