UUID Generator

A UUID is a 128-bit identifier that can be generated anywhere with almost no chance of a duplicate. Choose version 4 (random) or version 7 (time-ordered) below to generate one or a thousand UUIDs.

Reviewed by ToolNook editorial team Updated Sources

Version

What is a UUID?

A UUID (universally unique identifier), also called a GUID on Microsoft platforms, is a 128-bit value written as 32 hexadecimal digits in five groups, like f47ac10b-58cc-4372-a567-0e02b2c3d479. UUIDs let separate systems create identifiers independently, without a central counter, with practically no risk of two ever being the same. They are used as database keys, API request IDs, file names, session tokens and message IDs.

  • Version 4 is made of 122 random bits. It is the most widely used type.
  • Version 7, standardized in RFC 9562 (2024), starts with a 48-bit Unix timestamp in milliseconds followed by random bits. Because v7 IDs sort by creation time, they keep database indexes compact and fast, which makes them a better choice for primary keys.

How to use the UUID generator

  1. Choose v4 or v7.
  2. Enter how many you need, from 1 to 1,000.
  3. Pick a format: uppercase, without hyphens, or wrapped in braces for Windows registry and .NET style.
  4. Copy the list or download it as a text file. Click Generate new for a fresh batch.
  5. To check an existing value, paste it into Validate a UUID. Version 7 UUIDs also show their creation time.

How the UUIDs are generated

Random bits come from your browser's cryptographically secure generator (crypto.getRandomValues), the same source used for encryption keys. The generator then sets the version digit (the first digit of the third group: 4 or 7) and the variant bits (the first digit of the fourth group is 8, 9, a or b), exactly as the standard requires.

For version 4 the chance of a collision is astronomically small: you would need to generate about a billion UUIDs every second for 85 years to reach a 50% chance of a single duplicate.

Examples

  • v4: 3b241101-e2bb-4255-8caf-4136c566a962
  • v7: 01929f3c-5e1a-7c4d-9b3e-2f6a8d0c1e47 (the first 12 digits encode the timestamp)
  • Uppercase without hyphens: 3B241101E2BB42558CAF4136C566A962

More worked examples

Database keys: v7 UUIDs generated a few milliseconds apart sort in creation order, which keeps B-tree indexes compact compared with random v4 keys.

Common mistakes to avoid

  • Using UUIDs as secrets. They are identifiers, not passwords; use the password generator for secrets.
  • Storing them as text in large tables. Many databases have a native 16-byte UUID type.
  • Exposing creation times by accident. v7 UUIDs reveal when they were created; use v4 if that matters.

Sources and methodology

The calculations on this page follow these published standards and references. The code is covered by automated tests against known values.

Frequently asked questions

Are these UUIDs truly unique?

They are not guaranteed, but the odds of a duplicate are so small that UUIDs are treated as unique in practice. Version 7 also includes a timestamp, which further reduces the risk.

Should I use v4 or v7?

Use v7 for database primary keys and anything you want to sort by creation time. Use v4 when you do not want the ID to reveal when it was created.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit identifier format.

Can I use a UUID as a password or secret token?

A v4 UUID is random, but it was not designed as a secret. For passwords and API keys, use our password generator, which gives you more entropy per character.