Back to Generators

UUID v4 Generator

Generate random UUIDs (Universally Unique Identifiers) using version 4 (random-based).

Generated UUID
Generated UUID will appear here
Actions
About UUID v4

UUID v4 is generated using random bytes. A UUID v4 is 128 bits in total, with 122 bits of randomness and 6 bits reserved for version and variant indicators. This makes it extremely unlikely to generate duplicates.

Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

Use cases: Database IDs, transaction IDs, session identifiers, and any application needing globally unique identifiers.

Frequently Asked Questions

What is a UUID and why is it used?

A UUID (Universally Unique Identifier) is a 128-bit identifier designed to be unique across all systems without coordination. UUIDs are used for database primary keys, session IDs, transaction tracking, and anywhere you need guaranteed unique identifiers without a central authority.

What makes UUID v4 different from other versions?

UUID v4 is randomly generated, using 122 bits of randomness. Unlike v1 (timestamp-based) or v5 (name-based), v4 UUIDs are not predictable or reproducible. This makes them ideal when you need unique identifiers without revealing creation time or source data.

Can two UUID v4s ever be the same?

Technically possible but extremely unlikely. With 122 random bits, there are 5.3 × 10^36 possible UUIDs. You'd need to generate 2.7 × 10^18 UUIDs to have a 50% chance of one collision. In practice, UUID v4 collisions are considered impossible for any realistic use case.

What does each section of a UUID mean?

UUID format is 8-4-4-4-12 hex digits (xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx). The '4' indicates version 4. The 'y' position indicates the variant (8, 9, a, or b for standard UUIDs). Other positions are random. The hyphens are formatting only and don't affect uniqueness.