UUID Generator: Create Version 4 and Version 7 UUIDs

Generate one UUID or hundreds at once. Choose version 4 (random) or version 7 (time-ordered), pick lowercase, uppercase, no hyphens or braces, and copy or download the list. A built-in checker tells you the version and variant of any UUID.

Related Tools

Random Number Generator Password Generator Hash Generator (MD5, SHA-256) Unix Timestamp Converter JWT Decoder All Utilities

What is a UUID?

A UUID, or universally unique identifier, is a 128-bit value written as 32 hexadecimal digits in five groups, such as 123e4567-e89b-42d3-a456-426614174000. Systems create UUIDs on their own, without asking a central server, and the chance that two of them are the same is so small that it can be ignored in practice.

UUIDs are used as database keys, file names, session ids, order numbers, message ids and anywhere else a unique label is needed. The format is defined by RFC 9562, which updated the older RFC 4122.

How to generate UUIDs

  1. Choose version 4 for random UUIDs or version 7 for time-ordered UUIDs.
  2. Enter how many you need, up to 500.
  3. Pick the format: standard, uppercase, without hyphens or with braces.
  4. Press Generate, then copy all the results or download them as a text file.
  5. Use the checker at the bottom to inspect any UUID.

Version 4 or version 7?

Version 4 is made from random numbers: 122 of the 128 bits are random, and the rest mark the version and variant. It is the most widely used type and is a good default. Version 7, standardized in RFC 9562, starts with a 48-bit timestamp in milliseconds followed by random bits. Because new IDs sort after older ones, they work much better as database primary keys, since they reduce index fragmentation and keep related rows close together.

If you need unpredictable identifiers and do not care about order, choose version 4. If you store the IDs in a database that is sorted by key, version 7 is often a better choice. Version 7 UUIDs do reveal roughly when they were created, so avoid them when that is sensitive.

Are UUIDs really unique?

With 122 random bits, a version 4 UUID has so many possible values that you would need to create billions every second for many years before a collision became likely. The uniqueness depends on a good random source. This generator uses your browser's cryptographically secure random generator, not the weaker Math.random function.

Best practices

  • Store UUIDs in a native UUID column where your database has one, not as text, to save space and speed up lookups.
  • Do not use a UUID as a secret or a password. It identifies something, but it is not designed to be unguessable in every version.
  • Be consistent about the format. Compare UUIDs in lowercase to avoid false mismatches.
  • Use the nil UUID (all zeros) only as an explicit empty value.

Example: using UUIDs in a database

A typical table might have a primary key column of type uuid and a default that generates a new value when a row is inserted. Many databases can create version 4 values themselves, but for version 7 you often generate the value in your application code. Pasting a few sample UUIDs from this tool into test data is a quick way to seed a development database, and the checker confirms that a value copied from a log or an API really is a valid UUID.

UUID versions compared

Version How it is made Best for
Version 1 Time and node (often a hardware address) Legacy systems
Version 4 Random General purpose identifiers
Version 5 Hash of a name and namespace (SHA-1) Repeatable IDs from names
Version 7 Unix millisecond timestamp plus random bits Database keys that sort by time

Frequently Asked Questions

What is the difference between a UUID and a GUID?

They are the same thing. GUID is the name Microsoft uses.

How many characters is a UUID?

36 characters with hyphens, or 32 without them.

Can two UUIDs be the same?

In theory yes, but the chance is so small that it is ignored in practice.

Are the UUIDs generated securely?

Yes. They use the cryptographically secure random generator built into your browser.

What does the checker show?

Whether the text is a valid UUID, its version and variant, and for version 7 the creation time.

Which UUID version should I use for a database?

Version 7 is often preferred for primary keys because it sorts by time. Version 4 is fine for general use.

Are the UUIDs stored anywhere?

No. They are created in your browser and are not saved or sent.