Generate UUIDs

Up to 500 at a time, generated by your browser rather than requested from a server, so nobody else has ever seen them.

How to use it#

  1. Pick a version, how many you need, and the format you want them in.
  2. Click Generate. Changing the format restyles the same values rather than making new ones.
  3. Copy them all, or download the batch as a text file.

What version 4 means#

A version 4 UUID is 122 random bits with six bits reserved to mark the version and variant. There is no timestamp, no MAC address and no counter, so the value reveals nothing about the machine or moment that produced it.

That randomness is the whole safety argument. With 122 bits to draw from, a collision is not something anyone needs to design around, and no coordination between generators is required to avoid one.

The version selector on this page also offers version 7, which replaces the leading random bits with a millisecond timestamp so the values sort in the order they were made.

Where UUIDs go wrong as database keys#

Random UUIDs make poor clustered primary keys. Each insert lands at a random point in the index, which fragments it and slows writes as the table grows. In MySQL with InnoDB this shows up sharply.

The usual fixes are a time-ordered variant such as UUIDv7, or keeping an internal auto-increment key alongside a UUID exposed publicly. The second pattern buys you the thing people actually want from UUIDs: an id you can put in a URL without advertising how many records exist.

Formats you will be asked for#

Lowercase with hyphens is the canonical form and what almost everything expects. Uppercase appears in older enterprise systems, braces are a Microsoft convention, and the compact 32-character form turns up where a column is CHAR(32) or a filename cannot contain hyphens.

All four describe the same 128-bit value, and comparison is case-insensitive by specification. Normalising to lowercase on the way into a database saves you from having to care which form arrived.

Frequently asked questions#

Are these UUIDs truly random?

#

They come from crypto.randomUUID(), which draws on your operating system’s cryptographically secure random generator, the same source used for encryption keys.

Could two people get the same UUID?

#

Not in any practical sense. A version 4 UUID has 122 random bits; you would need to generate billions per second for decades before a collision became likely.

Are the generated values sent or stored anywhere?

#

No. They are created in your browser and exist only on this page until you copy them.

Which version does this generate?

#

Version 4 by default, the fully random variant. The version selector also offers version 7, which is time-ordered.

Should I use version 7 instead of version 4?

#

Use version 7 when the id is a database key. Its leading 48 bits are a millisecond timestamp, so new rows land at the end of the index rather than scattered through it, which is the write cost that makes version 4 a poor clustered key. Use version 4 when the id is public and should reveal nothing, because a version 7 value tells anyone who reads it when the record was created.

Can I generate a lot at once?

#

Up to 500 per batch. Click Generate again for another set. Each batch is independent.