UUID Generator

Get a new random UUID the moment the page opens, or generate up to 1,000 at once. Choose version 4 (fully random) or version 7 (time-ordered, ideal for database keys), uppercase or lowercase, with or without hyphens.

Your text never leaves your device.

How to use

  1. Choose Version 4 (random) or Version 7 (time-ordered).
  2. Set How many (1–1,000) and the format: Uppercase on or off, Hyphens on or off.
  3. Press Generate for a new set, then copy or download the list.

Examples

  • Before
    Version 4, how many: 2
    After
    b014bcb2-83ec-4f57-af5c-1386276d91dd 45c05a33-2025-4140-89ff-9b73aed9e03d
  • Before
    Version 7, how many: 3
    After
    01a173cb-94ec-7080-a7be-d7d757df7498 01a173cb-94ec-7081-a52f-157519814068 01a173cb-94ec-7082-947d-e094c5c2f190
  • Before
    Version 4, uppercase, no hyphens
    After
    568F25E2713F4087BE8BAA11B79F7420

How to read a UUID

Take 01a173cb-94ec-7080-a7be-d7d757df7498:

  • The first digit of the third group is the version: 4 or 7.
  • The first digit of the fourth group is the variant: 8, 9, a or b for standard RFC UUIDs.
  • In v7, the first 12 hex digits (01a173cb94ec) are the creation time in milliseconds since 1970. The rest is random, apart from a short counter described below.
  • In v4, everything except the version and variant digits is random.

Bulk generation and ordering

When you generate several v7 UUIDs, they are often created within the same millisecond. To keep them in order, the generator uses the 12 bits after the version digit as a counter, starting at a random value, as RFC 9562 suggests: in the example above, 7080, 7081 and 7082. A list of v7 UUIDs is therefore always sorted by creation, both as text and as bytes.

Formats

  • Lowercase with hyphens is the canonical form and what most languages and databases print.
  • Uppercase matches Microsoft tools and some older systems. UUID comparison is case-insensitive by the standard, but string comparison in code often is not, so pick one form and stick to it.
  • Without hyphens, 32 characters, fits fixed-width columns and file names. Store UUIDs in a native uuid or 16-byte binary column where possible instead of text: 16 bytes instead of 36 characters.

Common mistakes

  • Using v4 as a primary key in a large table. Random keys scatter inserts across the index and slow down writes. Use v7.
  • Exposing v7 IDs where time is sensitive. Anyone can read the creation time from a v7 UUID. Use v4 for public identifiers if that matters.
  • Generating IDs with Math.random. It is not designed to be unpredictable or unique. Use crypto.randomUUID() or a proper library in code.

Frequently asked questions

What is a UUID?

A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits in five groups, 8-4-4-4-12, such as 45c05a33-2025-4140-89ff-9b73aed9e03d. Systems create UUIDs independently, without a central counter, and can still treat them as unique. The format is defined in RFC 9562.

Should I use UUID v4 or v7?

Use v7 for database primary keys and anything you sort: it starts with a 48-bit timestamp in milliseconds, so new IDs sort after old ones and B-tree indexes stay compact. Use v4 when the ID must reveal nothing, not even its creation time, such as public tokens and file names. Both are equally unique in practice.

Can two UUIDs ever be the same?

In theory yes, in practice no. A v4 UUID has 122 random bits. You would need to generate about 2.7 quintillion (2.7 × 10^18) of them to reach a 50% chance of a single collision. v7 adds a timestamp, so collisions are possible only between IDs made in the same millisecond, and the 74 bits after it are random or a counter.

Is a GUID the same as a UUID?

Yes. GUID (globally unique identifier) is Microsoft's name for the same 128-bit format. Windows tools traditionally show GUIDs in uppercase, sometimes in braces: {568F25E2-713F-4087-BE8B-AA11B79F7420}. Turn on Uppercase to match that style.

Are these UUIDs secure and private?

They are generated in your browser with crypto.getRandomValues, the cryptographic random source, and never sent anywhere. That makes them unpredictable enough for IDs. For secrets such as API keys or password reset tokens, use a dedicated token with more randomness than a UUID's 122 bits and with no version digits.