UUID Generator

Generate random version 4 UUIDs in your browser. Create one or thousands at a time, with optional uppercase and the choice to drop the hyphens, then copy them all.

About UUID Generator

This tool generates Version 4 Universally Unique Identifiers (UUIDs) as specified in the latest standards. A Universally Unique Identifier[1] is a 128-bit label used to produce identifiers that are unique across space and time without requiring a central coordinating authority. This generator leverages the browser's cryptographically strong pseudo-random number generator, specifically the Web Cryptography API[4], to create Version 4 UUIDs[2]. These identifiers are ideal for use as database keys in distributed systems, transaction IDs, or any scenario where decentralized, unique identification is critical. The generated UUIDs conform to the canonical 8-4-4-4-12 format, represented as 32 hexadecimal digits, for example: `123e4567-e89b-42d3-a456-426614174000`.

The technical specification for UUIDs is defined by the Internet Engineering Task Force (IETF). The current standard is RFC 9562[9], which revises and obsoletes the legacy RFC 4122[10]. A Version 4 UUID is constructed almost entirely from random bits. Of the 128 total bits, 122 are dedicated to randomness. The remaining six bits are fixed to denote the version and variant. The four version bits are set to `0100` (binary for 4), and the two most significant bits of the variant field are set to `10`. This results in the characteristic structure `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`, where `y` is one of `8`, `9`, `A`, or `B` (representing the `10xx` variant bits in hexadecimal).

The probability of collision, which means generating the same UUID twice, is infinitesimally small for Version 4 UUIDs. With 122 random bits, there are 2^122 (approximately 5.3 x 10^36) possible V4 UUIDs. According to the principles of the birthday problem[3], you would need to generate approximately 2.71 quintillion UUIDs to have a 50 percent probability of a single collision. This level of uniqueness makes them exceptionally reliable for most applications, far exceeding the capacity of traditional sequential integer IDs, especially in systems that operate at a global scale without a central counter.

While Version 4 is the most common type of UUID due to its simplicity and high quality randomness, other versions serve different purposes. Version 1 UUIDs are generated using a timestamp and a MAC address, making them predictable and potentially leaking information. Versions 3 and 5 are deterministic, created by hashing a namespace and a name using MD5[7] or SHA-1[8], respectively. The newer RFC 9562 also introduces Version 6 (a reordered time based format), Version 7 (a Unix Epoch time based format), and Version 8 (a format for custom or experimental use cases). This tool focuses exclusively on Version 4 for its superior combination of randomness, uniqueness, and widespread support. UUIDs are also standardized as a Uniform Resource Name[6] (URN) namespace.

How to Use

  1. 1. Enter the quantity of UUIDs you wish to generate in the input field. You can generate one or many thousands.
  2. 2. Select your desired output format, such as lowercase or uppercase, and with or without hyphens.
  3. 3. Click the 'Generate UUIDs' button to create the list of unique identifiers.
  4. 4. The generated UUIDs will appear in the text area below the controls.
  5. 5. Use the 'Copy to Clipboard' button to easily copy all the generated UUIDs.
  6. 6. Optionally, use the 'Download' button to save the list as a plain text (.txt) file for later use.

Frequently Asked Questions

What is a Version 4 UUID?

A Version 4 UUID is a 128-bit number that is generated using random or pseudo-random numbers. Out of 128 bits, 122 are random, while 6 bits are fixed to indicate it is a Version 4, Variant 1 UUID, as defined in RFC 9562[9].

Are the UUIDs generated by this tool truly unique?

For all practical purposes, yes. The chance of generating a duplicate V4 UUID (a collision) is astronomically low. You would need to generate billions of UUIDs per second for many years to have a small chance of a collision, a scenario explained by the birthday problem[3].

What is the source of randomness for these UUIDs?

This tool uses the `Crypto.getRandomValues()` method from the browser's Web Cryptography API[4]. This is a cryptographically strong pseudo-random number generator (CSPRNG) suitable for generating secure and unique identifiers.

What is the difference between a UUID and a GUID?

The terms are often used interchangeably. GUID[5] (Globally Unique Identifier) is Microsoft's implementation of the UUID standard. While there are some minor historical differences in representation (like byte order), a modern V4 GUID is functionally identical to a V4 UUID.

How are the version and variant bits set in a V4 UUID?

In the standard `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx` format, the '4' is fixed, representing the version. The 'y' character represents the variant and will be one of `8`, `9`, `A`, or `B`. This is because the four bits for the variant are set to `10xx` in binary.

Why use UUIDs instead of sequential integer IDs?

UUIDs can be generated independently in any part of a distributed system without needing to communicate with a central authority. This prevents bottlenecks and single points of failure. It also makes merging records from different databases much simpler and can obscure the total number of records for security.

What is RFC 9562 and how does it relate to RFC 4122?

RFC 9562[9] is the current IETF standard for UUIDs, published in 2024. It formally obsoletes the older RFC 4122[10], clarifying ambiguities and introducing new UUID versions like V6 (time based, reordered) and V7 (Unix Epoch time based).

Can a UUID be converted to a URN?

Yes. The UUID specification includes a formal Uniform Resource Name[6] (URN) namespace. A UUID like `f81d4fae-7dec-11d0-a765-00a0c91e6bf6` can be expressed as the URN `urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6`.

Sources (10)
  1. Wikipedia: Universally Unique Identifier
  2. Wikipedia: UUID Version 4
  3. Wikipedia: Birthday Problem
  4. Wikipedia: Web Cryptography API
  5. Wikipedia: Globally Unique Identifier (GUID)
  6. Wikipedia: Uniform Resource Name (URN)
  7. Wikipedia: MD5
  8. Wikipedia: SHA-1
  9. IETF RFC 9562: Universally Unique Identifiers (UUIDs)
  10. IETF RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace (Obsoleted)

About Matt George

I'm Matt George, a software engineer in the startup space. I run my own shop building software for early-stage founders, and I love making free tools and experiences that people actually use. Enjoy using UUID Generator!

More Free Tools