UUID Generator

Generate random version 4 UUIDs, one or many at a time.

About this tool

Generates random version 4 UUIDs in your browser using crypto.getRandomValues, the cryptographically secure random source. Set how many you need, optionally drop the hyphens or switch to uppercase, and copy the lot.

What a UUID is. A UUID (universally unique identifier), also called a GUID, is a 128-bit value written as 32 hexadecimal digits in the pattern 8-4-4-4-12, for example f47ac10b-58cc-4372-a567-0e02b2c3d479. The point is that any two parties can generate them independently, with no coordination, and still never collide in practice.

Version 4 specifically. The UUID standard (RFC 4122, updated by RFC 9562) defines several versions. Version 4 is almost entirely random: 6 bits are fixed to mark the version and variant, and the other 122 bits come from the random source. Other versions encode a timestamp and node (v1), a hash of a name (v3/v5), or a time-ordered layout (v7) — v4 is the right default when you just need an opaque unique key.

How unique is "unique"? With 122 random bits, you would need to generate roughly 2.7 × 1018 UUIDs before the chance of a single collision reaches 50% (the birthday bound). At a billion per second that's about 85 years. For any realistic application the collision risk is zero.

Formatting notes. The canonical form is lowercase with hyphens. Removing the hyphens gives a 32-character string some databases and filenames prefer; uppercase is accepted by parsers but non-canonical. All three represent the same value. UUIDs are not secret — they're identifiers, not tokens — so don't use one as a password or an access key.

v4 vs. v7 for database keys. Random v4 keys scatter inserts across a table's index, which can hurt write performance and locality on large tables. The newer v7 UUIDs are time-ordered, so recent rows cluster together. If you control the schema and insert volume is high, v7 is worth a look; v4 remains fine for most uses and for anything client-generated.

For a hash-based identifier derived from content rather than random bits, use the hash generator. For random passwords from the same secure source, see the password generator.

Frequently asked questions

What does "version 4" mean?
It's the all-random UUID type. The version and variant bits are fixed by the standard; the remaining 122 bits are generated from a random source rather than a timestamp or hardware address.
How unique are these really?
With 122 random bits, you could generate a billion per second for decades before a collision became statistically likely. In practice the risk is nil.
Why would I remove the hyphens?
Some databases, keys, and filenames prefer a single unbroken 32-character hex string. It's the same value without the four dashes.
Is a UUID secret or secure to use as a token?
No. A UUID is an identifier, not a credential. It may appear in logs and URLs. Use a proper random token for anything that grants access.
Should I use v4 or v7 for a primary key?
v4 is fine for most cases and for client-generated IDs. v7 is time-ordered, which improves index locality for high-volume inserts on large tables.
Are these generated locally?
Yes. Nothing is sent anywhere — they're produced in your browser with its built-in secure RNG.