UUID Generator

Generate random UUIDs (Universally Unique Identifiers) instantly. Create version 4 UUIDs for databases, APIs, and applications.


Generated UUID

V4 · 1 generated
a8c330ec-9f62-47cd-b4f6-c5129d20ce45

About UUID versions

v4 (Random)
122 random bits. Best for general-purpose unique identifiers where ordering doesn't matter.
v7 (Time-ordered)
48-bit timestamp + 74 random bits. Sortable by creation time - ideal for database primary keys.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier designed to be unique across all systems without requiring a central authority. Also known as GUIDs (Globally Unique Identifiers) in Microsoft ecosystems, UUIDs are formatted as 32 hexadecimal digits displayed in five groups separated by hyphens:

550e8400-e29b-41d4-a716-446655440000

The format is 8-4-4-4-12 characters, representing the 128 bits in a human-readable form.

UUID versions

There are several UUID versions, each with different generation methods:

VersionNameGeneration Method
v1Time-basedTimestamp + MAC address
v2DCE SecurityTimestamp + MAC + local domain
v3Name-based (MD5)MD5 hash of namespace + name
v4RandomCryptographically random
v5Name-based (SHA-1)SHA-1 hash of namespace + name
v7Time-orderedTimestamp + random (new standard)

Version 4 is the most commonly used -it generates UUIDs from cryptographically secure random numbers. The only fixed bits are the version (4) and variant indicators.

Why use UUIDs?

No coordination required - Unlike auto-incrementing database IDs, UUIDs can be generated independently by any system without risk of collision. This is essential for distributed systems and microservices.

Unpredictable - Random UUIDs don’t reveal information about creation order or volume. Sequential IDs like /users/1, /users/2 expose how many records exist and allow enumeration attacks.

Merge-friendly - When combining data from multiple sources, UUIDs won’t conflict. Two databases with auto-incrementing IDs would have colliding primary keys.

Client-side generation - Applications can generate IDs before sending data to the server, enabling optimistic UI updates and offline-first architectures.

UUID collision probability

With 122 random bits (6 bits are fixed for version and variant), UUID v4 has 2^122 possible values -over 5 undecillion combinations.

To have a 50% chance of a collision, you’d need to generate approximately 2.7 quintillion UUIDs. If you generated 1 billion UUIDs per second, it would take about 85 years to reach that point.

For practical purposes, UUID collisions are not a concern.

Common use cases

Database primary keys - Many modern databases support UUID columns natively. PostgreSQL has a uuid type, MySQL has BINARY(16) or CHAR(36).

API resource identifiers - Using UUIDs in URLs (/api/orders/550e8400-e29b-41d4-a716-446655440000) prevents enumeration and doesn’t expose business metrics.

Distributed systems - Microservices can generate IDs independently without a central ID service becoming a bottleneck or single point of failure.

Session tokens - UUIDs make suitable session identifiers when cryptographic randomness is used for generation.

File naming - Uploaded files can be stored with UUID names to prevent conflicts and avoid exposing original filenames.

UUIDs vs other identifiers

TypeExampleProsCons
Auto-increment12345Simple, compact, sortableRequires coordination, predictable
UUID v4550e8400-e29b-...No coordination, unpredictableLarge (36 chars), not sortable
UUID v7018e4b6c-...Sortable, no coordinationNewer, less supported
ULID01ARZ3NDEKTSV...Sortable, compact, no coordinationLess standardised
Snowflake1541815603606036480Sortable, compactRequires coordination

How this tool works

Click to generate cryptographically random version 4 UUIDs. Generation happens entirely at the edge via a QuantCDN Edge Function -using secure randomness from the runtime environment.