UUID Generator (v4)

Version 4 (random) Web Crypto API

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. It is represented as 32 hexadecimal digits in five groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are designed to be globally unique without a central coordinating authority, making them essential for distributed systems, databases, and APIs.

The term GUID (Globally Unique Identifier) is Microsoft's name for the same concept. UUIDs and GUIDs follow the same format and specification.

UUID Versions

The RFC defines several UUID versions. Version 1 uses the current timestamp and the machine's MAC address, so it is partially traceable and ordered. Version 4 (used by this tool) is generated entirely from cryptographically secure random numbers, providing strong uniqueness guarantees with no information leakage. Version 5 is generated by hashing a namespace and a name with SHA-1, producing deterministic UUIDs for the same input.

UUID v4 is the most widely used version. With 122 random bits, the probability of generating a duplicate is negligible. You would need to generate roughly 2.7 quintillion UUIDs to have a 50% chance of a single collision.

Where UUIDs are Used

UUIDs serve as primary keys in databases (PostgreSQL has a native uuid type), as identifiers in REST APIs and microservices, as correlation IDs for distributed tracing, and as file or session identifiers. They are preferred over auto-increment integers when IDs must be generated without database coordination, such as in offline-first applications or multi-region architectures.

How to Use This Generator

  1. Click Generate to create a single UUID v4. It appears in the large display area at the top.
  2. Click the displayed UUID to copy it to your clipboard instantly.
  3. Use Generate bulk to create 5, 10, 25, 50, or 100 UUIDs at once.
  4. Click Copy all to copy the entire history as a newline-separated list.

Frequently Asked Questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. It is represented as 32 hexadecimal digits displayed in five groups separated by hyphens. UUIDs are designed to be globally unique without requiring a central authority, making them ideal for distributed systems.

What is the difference between UUID v1 and v4?

UUID v1 is generated from the current timestamp and the machine's MAC address, making it partially predictable and traceable. UUID v4 is generated entirely from random numbers, providing no information about when or where it was created. V4 is the most commonly used version because it is simple, private, and has an extremely low collision probability.

Can two UUIDs be the same?

In theory, yes. In practice, it is extraordinarily unlikely. UUID v4 has 122 random bits, giving 5.3 x 10^36 possible values. You would need to generate about 2.7 quintillion UUIDs to have a 50% chance of a single collision. For all practical purposes, UUID v4 values are unique.

Should I use UUID or auto-increment IDs?

Auto-increment IDs are simpler, smaller (4-8 bytes vs 16 bytes), and faster to index. UUIDs are better when you need to generate IDs without database coordination, merge data from multiple sources, or avoid exposing sequential record counts. Many systems use both: UUIDs as public identifiers and auto-increment IDs as internal primary keys.

What is a GUID?

GUID (Globally Unique Identifier) is Microsoft's name for a UUID. They are the same thing: a 128-bit identifier in the same format. The term GUID is used primarily in Microsoft technologies (.NET, SQL Server, COM), while UUID is the standard term used everywhere else.

How many possible UUIDs are there?

UUID v4 has 122 random bits (6 bits are fixed for version and variant), giving 2^122 or approximately 5.3 x 10^36 possible values. Even generating a billion UUIDs per second, it would take over 100 billion years to exhaust the space.