UUID Generator

Generate UUID v4 (random) and v7 (time-sortable) identifiers in bulk. 100% private — runs in your browser.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify information in computer systems. It is formatted as 32 hexadecimal characters split into five groups by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

UUIDs are designed to be generated independently by different systems without coordination — the probability of two systems generating the same UUID is astronomically small. This makes them ideal as database primary keys, request IDs, file names, and correlation tokens in distributed systems.

The most common versions are UUID v4 (128 random bits — maximum randomness) and UUID v7 (timestamp + random bits — database-friendly because they sort chronologically, which avoids B-tree index fragmentation).

UUID v4 vs UUID v7

FeatureUUID v4UUID v7
StructureRandom (122 random bits)Timestamp (48-bit ms) + random
Sortable by timeNoYes — database-friendly
Collision probabilityExtremely lowEven lower (time + random)
DB index efficiencyRandom — causes page splitsSequential — better B-tree performance
Formatxxxxxxxx-xxxx-4xxx-yxxxttttttt-tttt-7xxx-yxxx
Best forGeneral purpose IDsDB primary keys, events

UUID in Different Languages

Language / PlatformMethod
Node.js 14.17+crypto.randomUUID()
Python 3.ximport uuid; uuid.uuid4()
Gogithub.com/google/uuid — uuid.New()
Java 8+UUID.randomUUID().toString()
C# .NETGuid.NewGuid().ToString()
PostgreSQLgen_random_uuid()
MySQL 8+UUID()
Browser JScrypto.randomUUID()

Frequently Asked Questions

A UUID (Universally Unique Identifier) is a 128-bit label formatted as 32 hex characters and 4 hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Used as database primary keys, request IDs, and correlation tokens.

UUID v4 uses 122 random bits. This generator uses crypto.randomUUID() which relies on the OS CSPRNG (same as Node.js crypto.randomUUID). The probability of collision between two UUIDs is astronomically small.

UUID v7 encodes a millisecond timestamp in the first 48 bits, making UUIDs sortable by creation time. This avoids random page splits in B-tree database indexes, significantly improving INSERT performance at scale.

Yes — UUID characters (0-9, a-f, and hyphens) are all URL-safe. You can also strip hyphens for a compact 32-character hex string.

Related Tools