UUID Generator

Generate UUID v4 values instantly. Single or bulk, uppercase or lowercase, with or without hyphens.

Count
Uppercase
Hyphens
97caf99e-fd45-4792-ac80-847dfb2e0ce7

Frequently asked questions

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit value used to uniquely identify objects in software systems. The standard format is 8-4-4-4-12 hexadecimal characters separated by hyphens, like 550e8400-e29b-41d4-a716-446655440000. UUIDs are used as database primary keys, session tokens, file names, and anywhere a unique ID is needed without a central authority.
What is UUID v4?
UUID v4 is randomly generated — all 128 bits are random except for 4 bits that identify the version (4) and 2 bits for the variant. It is the most commonly used UUID version because it requires no network access, no timestamp, and no coordination between systems. The probability of two v4 UUIDs colliding is astronomically small.
Are these UUIDs truly unique?
Yes, for all practical purposes. UUID v4 has 122 random bits, giving 2^122 possible values (about 5.3 × 10^36). To have a 50% chance of a single collision, you would need to generate 2.7 × 10^18 UUIDs. At one billion UUIDs per second, that would take over 85 years.
Is it safe to use UUIDs as database primary keys?
Yes, and it has advantages over sequential integer IDs: UUIDs can be generated client-side without a round-trip to the database, they don't expose your record count or insertion order, and they work naturally in distributed systems where multiple servers insert records simultaneously.
What is the difference between UUID with and without hyphens?
The hyphens are purely cosmetic separators that make UUIDs easier to read. Both 550e8400-e29b-41d4-a716-446655440000 and 550e8400e29b41d4a716446655440000 represent the same value. Most databases and APIs accept both forms, though the hyphenated version is the standard RFC 4122 format.
How do I generate a UUID in code?
In JavaScript/Node.js (v14.17+): crypto.randomUUID(). In Python: import uuid; str(uuid.uuid4()). In Go: use the github.com/google/uuid package. In PostgreSQL: SELECT gen_random_uuid(). In Java: UUID.randomUUID().toString(). Most modern languages and databases have UUID generation built in.