↑↓ to move ↵ to open Esc to close Browse all tools

UUID Generator

Generate UUIDs (GUIDs) in bulk, version 4 or version 7, in the format your code needs, and check any UUID for its version, variant and timestamp.

Generate UUIDs

1 to 1,000
Wrap each UUID
Separate with

Validate a UUID or GUID

With or without dashes, braces, quotes or urn:uuid:.

Generated in your browser. Nothing is sent or stored.

What a UUID is

A UUID, or universally unique identifier, is a 128-bit number written as 32 hexadecimal digits in five groups, like 017f22e2-79b0-7cc3-98c4-dc0c0c07398f. Systems create them on their own, without asking a central server for the next number, and can still be confident that no one else will make the same one. That makes them popular as database keys, file names, request IDs and message IDs.

GUID is Microsoft's name for the same thing. The bits are identical; Windows tools just like to print GUIDs in uppercase and inside braces. Two digits in every UUID carry metadata: the first digit of the third group is the version, and the first digit of the fourth group shows the variant. In the example above, the 7 marks version 7 and the 9 marks the standard variant defined in RFC 9562.

UUID v4 vs v7

Version 4 is pure randomness: 122 random bits plus the 6 fixed bits for version and variant. It reveals nothing about where or when it was made, and it is the most widely supported version.

Version 7 starts with a 48-bit timestamp, the number of milliseconds since 1 January 1970, followed by random bits. UUIDs made later sort after older ones, as text and as bytes. That matters for databases: B-tree indexes stay compact when new keys arrive at the end, while random v4 keys land all over the index and cause more page splits. Many teams now pick v7 for primary keys for that reason. The trade-off is that anyone who sees a v7 UUID can read when it was created, which the validator above shows.

This generator follows RFC 9562 for v7. When you create a batch, several UUIDs share the same millisecond, so the 12 bits after the version hold a counter that starts at a random value and counts up. The whole batch therefore stays in creation order.

How likely is a collision?

The odds follow the birthday problem: duplicates become likely only once you have made about the square root of the number of possible values. For version 4, with 2122 possible values, you would need about 103 trillion UUIDs to reach a one in a billion chance that any two are the same. A version 7 UUID can only collide with another one from the same millisecond, and then the remaining 74 bits of counter and randomness still have to match.

In practice, duplicates come from weak random sources, from code that copies an ID instead of making a new one, or from buggy libraries. This tool uses the cryptographic random generator of your browser.

Formats

  • Lowercase with dashes is the standard text form and what most languages and databases print.
  • Uppercase is common in Windows, .NET and older documentation. Comparisons should ignore case.
  • Without dashes gives 32 characters, handy for file names, URLs or compact storage.
  • Braces or quotes save typing when you paste the UUIDs into code, JSON or a SQL list. With commas as the separator, single quotes give you a ready IN (...) list.

How to use the UUID generator

  1. 1Choose v4 for random UUIDs or v7 for time-ordered ones, and enter how many you need, from 1 to 1,000.
  2. 2Set the format: uppercase, without dashes, wrapped in braces or quotes, one per line or separated by commas.
  3. 3Copy all UUIDs or download them as a .txt file. Generate new gives you a fresh bulk set.
  4. 4To validate a UUID, paste it into the check box. You see whether it is valid, its version and variant, and for v7 the time it was created.

Frequently asked questions

Is a GUID the same as a UUID?

Yes. GUID, short for globally unique identifier, is the name Microsoft uses, for example in .NET and SQL Server. The format is the same 128-bit value with 32 hex digits. Windows tools often show GUIDs in uppercase and wrapped in braces, which you can turn on above.

Should I use UUID v4 or v7?

Use v7 for new database keys and anything you want to sort by creation time. Its first 48 bits are a timestamp, so new rows land at the end of an index instead of at random places. Use v4 when the ID should reveal nothing, not even roughly when it was made.

Can two UUIDs ever be the same?

In theory yes, in practice not with a good random source. Version 4 has 122 random bits. You would need to make about 103 trillion of them to reach a one in a billion chance of a single duplicate. Real duplicates come from broken random generators or copied values, not from the math.

Are these UUIDs safe to use as secrets?

They come from your browser's cryptographic random generator, so v4 UUIDs are hard to guess. Still, UUIDs are made to be identifiers, not passwords or tokens. A v7 UUID also shows when it was created. For session tokens or API keys, use a purpose-built secret with more randomness.

Are the UUIDs generated on a server?

No. Everything happens in your browser with the built-in crypto API. Nothing is sent or logged, so you can use the UUIDs right away as keys in your own systems.