EthicalFusion

UUID Generator

Generate random version-4 UUIDs.

Was this tool helpful?

Thanks for the feedback!

Click Generate UUIDs and this UUID generator gives you five fresh version-4 UUIDs, one per line, ready to copy. Each comes from your browser's crypto.randomUUID(), which fills 122 of the 128 bits from a cryptographically secure random source, and nothing is fetched from a server.

Anatomy of a version-4 UUID

A UUID is 128 bits written as 32 hexadecimal digits in five hyphen-separated groups of 8, 4, 4, 4 and 12, for 36 characters in total. For example:

3f0c9a2e-7b1d-4c5a-9e8f-1a2b3c4d5e6f
  • The first digit of the third group is always 4, the version number.
  • The first digit of the fourth group is always 8, 9, a or b, which encodes the variant defined in the standard.
  • Every other digit is random.

Output is lowercase, as the current standard, RFC 9562, recommends; software should compare UUIDs case-insensitively. Two special values are not random at all: the nil UUID, 00000000-0000-0000-0000-000000000000, often used as a placeholder, and the max UUID with every digit set to f.

How unlikely is a duplicate?

With 122 random bits there are about 5.3 × 10^36 possible version-4 values. By the birthday calculation you would need roughly 2.7 × 10^18 of them for a 50% chance that any two match, which at a billion UUIDs per second takes about 86 years. Real-world duplicates come from broken random generators, not from the maths, which is why this page relies on the browser's secure generator rather than Math.random().

UUID, GUID and the other versions

GUID is Microsoft's name for the same 128-bit format. .NET and SQL Server often display GUIDs in capitals, sometimes wrapped in braces, but the value is identical. RFC 9562, published in 2024, replaced the older RFC 4122 and added versions 6, 7 and 8:

VersionBuilt fromTypical use
v1Timestamp and node IDLegacy systems
v4Random bitsGeneral-purpose IDs
v7Unix time in milliseconds plus random bitsDatabase keys that sort by creation time

This page produces v4 only. If a table's primary key index suffers from random inserts, v7 is worth considering because new values arrive in roughly ascending order.

Practical uses and storage tips

  • Primary keys created in an app before the record reaches the database, which suits offline-first apps.
  • Idempotency keys sent with payment or order requests, so a retried request is not processed twice.
  • Correlation IDs that tie together log lines from several services, test fixtures, and unique upload file names.

PostgreSQL has a native uuid type that stores 16 bytes. In MySQL, BINARY(16) with UUID_TO_BIN() takes far less space than CHAR(36). Need more than five? Click again for another batch. RFC 9562 warns against assuming UUIDs are hard to guess, so for secret tokens use the Password Generator.

Frequently asked questions

How many UUIDs does it generate at once?
Five per click, each on its own line. Click the button again for another five.
Can two generated UUIDs ever be the same?
In theory yes, in practice no: with 122 random bits you would need billions of billions of values before a repeat became likely.
What is the difference between a UUID and a GUID?
Nothing in the format. GUID is the name Microsoft uses, and its tools often show the value in uppercase or inside curly braces.
Should I use UUID v4 or v7 for database keys?
v4 is fine for most tables. If insert speed on a large indexed table matters, v7 keeps new keys roughly in time order, which is kinder to B-tree indexes.
Can I get the UUIDs in uppercase?
The output is lowercase. Paste it into any case converter or your editor's uppercase command; the values remain valid either way.
Is a random UUID safe to use as a password reset token?
It is better to use a token generated specifically as a secret. The UUID standard advises not to rely on UUIDs being unguessable.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.