Online UUID v4 generator

Your generated UUID version-4

Bulk UUID/GUID generator

You can generate up to 1000 UUIDs at a time using the Bulk UUID Generator. Select the UUID version you require - either version-1, version-4 or version-7 - by selecting it from the drop-down list.

Min 1, max 1000

UUID in a nutshell

Because you might be a little confused about what a UUID actually is.

Version 1

A version 1 UUID is a unique identifier that is generated from a timestamp and the MAC address of the computer, ensuring uniqueness. However, because the MAC address is exposed, it poses potential privacy and security risks.Read more about v1

Version 4

A version 4 UUID is a unique identifier generated from random numbers. This makes it highly unlikely that any two UUIDs will ever be the same. The version 4 UUIDs generated by this site use a secure random number generator for maximum security.Read more about v4

Version 7

A version 7 UUID is a time-ordered UUID that encodes a Unix timestamp with millisecond precision in its most significant 48 bits. It uses 6 bits for version and variant, with the remaining 74 bits randomly generated. The sequential nature of UUIDv7 improves database performance by addressing the index locality issue, unlike the random UUIDv4.

UUID version 4 (UUIDv4) is a 128-bit unique identifier generated using random numbers according to the specifications in RFC 4122. UUIDv4 contains 122 bits of randomness, with six bits reserved for version/variant information. It is displayed as a 36-character hexadecimal string, such as "xxxxxxxx-xxxx-4xxx-Nxxx-xxxxxxxxxxxx," where "4" indicates version 4.

UUIDv4 follows the pattern of eight 4-digit hex groups. Version '4' occupies bits 6–7 of byte 6 (the 13th hex character), and variant bits (bits 8–9 and A–B) occupy bits 6–7 of byte 8 (the 17th hex character). This leaves 122 random bits, ensuring uniqueness with 5.3×10³⁶ combinations.

UUIDv4 provides the maximum amount of entropy (122 random bits) without any embedded metadata, such as timestamps or MAC addresses. This makes it ideal for security-sensitive applications, session tokens, and distributed systems that require context-free identifiers.

With 122 random bits, the collision probability of UUIDv4 is 1 in 2.71×10¹⁸, which is equivalent to generating one billion UUIDs per second for 85 years to reach a 50% collision risk. UUIDv7 reduces randomness to 74 bits, but adds time-ordering.

A random distribution results in poor index locality, which leads to page splits and fragmentation in B-tree indexes. The time-ordered nature of UUIDv7 provides better insert performance, making it 10-20% faster than other methods in benchmarks for large datasets.

There are six fixed bits: Four bits for the version (0100) at position 13 and two variant bits (10) at position 17. This leaves 122 bits for randomness with version 4, variant 1, or 121 bits with version 4, variant 2.

Use UUID version 4 (UUIDv4) for the following: 1) Security credentials (API keys and tokens), 2) Privacy-sensitive data, 3) Decentralized systems without clock synchronization, and 4) Temporary identifiers. Avoid using it for database indexes that require temporal ordering.

Most languages use cryptographically secure random number generators. Examples include: JavaScript's crypto.randomUUID(), Python's uuid.uuid4(), and Java's UUID.randomUUID(). Some implementations, such as .NET, combine random and counter bits for better performance.

Unlike UUID v1 (MAC addresses) or v3/v5 (namespace hashes), UUID version 4 (UUIDv4) does not contain any embedded metadata. This makes it safe for public exposure without the risk of information leakage.

UUID version 4 (UUIDv4) requires 16 bytes, whereas integers require 4–8 bytes. This increases the size of the index by four times (compared to a four-byte integer) and impacts JOIN performance. Although compression (e.g., PostgreSQL's TOAST) can reduce overhead, it cannot eliminate it.