UUID Generator: Random Version 4 UUIDs

Version 4 UUIDs from a cryptographic random source, up to 100 per run. Learn the format, the real collision odds and when time-ordered v7 might suit you better.

The output will appear here.
Advertisement Clicker Alchemist — a mobile game by icyabmod, on Google Play and the App Store

How UUID Generator: Random Version 4 UUIDs works

Version 4 UUIDs from a cryptographic random source, up to 100 per run. Learn the format, the real collision odds and when time-ordered v7 might suit you better.

Input Count
Output UUID values
Works done 3,947

How to use it

A UUID generator produces identifiers that are unique across systems without any central counter. This one creates version 4 (random) UUIDs, from 1 to 100 per run with 5 as the default, using your browser's cryptographic generator: crypto.randomUUID where available, or an equivalent built on crypto.getRandomValues. Nothing is sent to our server. Use the values as database keys, test data, file names or request IDs.

Using the UUID generator

  1. Enter how many UUIDs you need in Count, from 1 to 100.
  2. Press Run tool.
  3. Copy the list, one UUID per line, with Copy output, or save it as a text file with Download output.

Anatomy of a version 4 UUID

A UUID is a 128-bit number written as 32 hexadecimal digits split by hyphens into groups of 8, 4, 4, 4 and 12, for example 7c9e6679-7425-40de-944b-e07fc1f90ae7. With hyphens it is 36 characters long. In version 4 only six bits are fixed. The first digit of the third group is always 4, marking the version, and the first digit of the fourth group is 8, 9, a or b, marking the variant. The remaining 122 bits are random.

Because the version digit sits in a fixed place, you can recognize a v4 UUID at a glance: look at the first character after the second hyphen.

How likely is a collision, really?

122 random bits give about 5.3 × 10³⁶ possible values. The right way to think about duplicates is the birthday problem: the question is not whether one particular UUID repeats, but whether any two in your whole collection match. For n UUIDs, the chance of at least one collision is roughly n² ÷ (2 × 2¹²²).

UUIDs generatedChance of at least one duplicate
1 billion (10⁹)About 1 in 10 quintillion
1 trillion (10¹²)About 1 in 10 trillion
103 trillionAbout 1 in a billion
2.7 × 10¹⁸About 50 percent, which means a billion UUIDs per second for roughly 86 years

In practice the danger lies not in the maths but in the random source. A weak generator, or one seeded identically on cloned virtual machines, can repeat values long before these numbers come into play, and code built on Math.random is the classic culprit. This tool relies on the browser's cryptographic generator, so that risk does not apply.

Version 4 or version 7?

RFC 9562, published in 2024, updated the UUID standard and added time-ordered versions. Version 7 starts with a millisecond Unix timestamp, so UUIDs created one after another sort in creation order. That suits primary keys in databases with B-tree indexes: new rows land at the end of the index instead of at random positions, which keeps inserts efficient on large tables. Version 4 is fully random, reveals nothing about when it was created and cannot be predicted from earlier values. This tool generates version 4 only. Consider v7 for very high-volume tables, and stick with v4 for identifiers that should not leak timing information.

Where UUIDs earn their keep

  • Primary keys in systems where several servers or offline clients create records without coordinating.
  • Collision-free names for user uploads and generated files.
  • Request or correlation IDs that tie together log lines across services.
  • Placeholder IDs for fixtures, sample JSON and unit tests; the JSON formatter helps tidy the data around them.
  • Public identifiers in URLs where sequential numbers would reveal how many records or customers you have.

Things to keep in mind

  • A UUID is not a secret: v4 values are hard to guess, but the standard advises against treating UUIDs as security tokens. Use purpose-built random secrets for session tokens or password-reset links, and the password generator when you need a password.
  • Letter case: the standard says hex digits should be output in lower case and accepted in either case on input, so normalize both sides before comparing strings.
  • Storage: a native UUID column or a 16-byte binary field is smaller and indexes better than a 36-character text column.

Privacy

UUIDs are generated entirely in your browser. In a secure context the tool calls crypto.randomUUID; elsewhere it builds standards-compliant values from crypto.getRandomValues. Generated values are not sent to our server or stored, and the page only increments an anonymous usage counter. For background on the format and its history, read what is a UUID.

Advertisement icyabmod — get a website for your business, design it on a live demo

Frequently asked questions

For practical purposes, yes. GUID, short for globally unique identifier, is the name some platforms and programming environments use for the same 128-bit value written in the 8-4-4-4-12 layout. Some tools display GUIDs in upper case or wrapped in curly braces, but the value is identical. The v4 values generated here work in systems that expect a GUID.

In theory yes, in practice no. Version 4 carries 122 random bits, so even after generating a trillion UUIDs the chance of a single collision is about 1 in 10 trillion. Duplicates seen in the real world almost always come from faulty random number generators or ones seeded identically. This tool uses a cryptographic generator, so it does not share that weakness.

No. Version 4 is entirely random, so the alphabetical order of the values has nothing to do with when they were created. If you need sortable identifiers, use version 7, which begins with a timestamp; this tool only produces version 4. Keeping a separate created-at column is also a reliable way to order records by time.

It is not recommended. A v4 UUID is hard to guess, but it is designed as an identifier and routinely appears in logs, URLs and error messages. The standard itself says UUIDs should not be used as security capabilities. For values that must stay secret, use random keys created for that purpose and long enough for the job, or passwords from the password generator.

The cap keeps the browser tab fast and the output a sensible length to copy. If you need more, run the tool several times. For jobs that require thousands or millions of identifiers, generate them directly in your application code or with your database's built-in UUID functions, which is both faster and easier to automate.