UUID Generator

Random v4 or time-ordered v7, one or a thousand

Version

UUIDs (v4)

UUID Generator guide

A UUID is a 128-bit identifier written as 32 hex digits, like 0192f0c1-7b3a-7cde-8f00-123456789abc. It is unique enough that systems can create IDs on their own, without asking a central database, and never clash. This generator makes version 4 or version 7 UUIDs in your browser, one at a time or up to 1,000 at once.

v4 or v7?

  • v4, random. 122 random bits from your browser's cryptographic random number generator. Use it for most IDs and tokens, and wherever the ID shouldn't reveal when it was made.
  • v7, time-ordered. Starts with the creation time in milliseconds, so IDs sort in the order they were made. That keeps database indexes compact, which makes v7 a good choice for primary keys. It does reveal roughly when each ID was created.

Ordered within the same millisecond

Generating many v7 UUIDs at once puts several in the same millisecond. This tool counts up a 12-bit field within each millisecond, as RFC 9562 describes, so a whole batch still sorts in creation order.

Format options

  • Uppercase. Some tools, such as SQL Server and Windows utilities, show UUIDs in capitals. The value is the same either way.
  • Hyphens. Turn them off for the compact 32-character form used in some URLs and file names.
  • Braces { }. Wraps each UUID in braces, the style of the Windows registry and COM.

Will two UUIDs ever collide?

In practice, no. A v4 UUID has 122 random bits, so you would need to generate about 2.7 quintillion of them to reach a 50% chance of a single duplicate.

Frequently asked questions

What is a UUID?
A universally unique identifier: a 128-bit value written as 32 hex digits in five groups, 8-4-4-4-12. Programs create them independently, without coordinating, and they don't clash.
Are these UUIDs random enough to use?
Yes. v4 UUIDs come from crypto.randomUUID and the random bits of v7 from crypto.getRandomValues, the browser's cryptographically secure random number generators.
Should I use UUID v4 or v7 for database keys?
v7 is usually better for primary keys, because new IDs sort after old ones and keep B-tree indexes compact. Use v4 when the ID shouldn't reveal its creation time.
Can I generate UUIDs in bulk?
Yes. Set How many to any number up to 1,000, then copy the list or download it as a text file with one UUID per line.
Are the UUIDs stored or sent anywhere?
No. They are created in your browser and never sent to a server, so nobody else has seen them.