UUID Generator

Generate random version 4 UUIDs or time-ordered version 7 UUIDs (GUIDs) in bulk, in lowercase or uppercase, with or without hyphens.

How to use the UUID Generator

  1. Enter the how many.
  2. Choose the version from the list.
  3. Tick UPPERCASE if you want that option; leave it clear otherwise.
  4. Tick Include hyphens if you want that option; leave it clear otherwise.
  5. Tick Wrap in {braces} if you want that option; leave it clear otherwise.
  6. The result updates instantly as you type. There is no button to press.
  7. Use Copy result to copy the figures, or Copy link to share a link that reopens the UUID Generator with the same inputs.

How it works

A UUID (universally unique identifier), called a GUID in Microsoft systems, is a 128-bit value used to label things without a central authority handing out numbers. Databases use them as primary keys, distributed systems use them to tag messages and events, and apps use them for file names, session IDs and object IDs. They're written as 32 hexadecimal digits in five groups, 8-4-4-4-12, such as 3f2b6c1e-8d4a-4f6b-9c3e-2a1b0c9d8e7f.

Version 4 UUIDs are almost entirely random: 122 random bits plus 6 fixed bits that mark the version and variant. You can see the version in the first digit of the third group, always "4". Version 7, standardised in RFC 9562 in 2024, puts a 48-bit Unix timestamp in milliseconds at the front, followed by random bits. Version 7 UUIDs sort in the order they were created, which keeps database indexes compact and fast, so they're increasingly recommended for primary keys.

This generator uses your browser's cryptographically secure random source for every random bit. Nothing is sent to a server, and every press of Generate again produces fresh values. Choose uppercase, no hyphens or braces to match whatever format your system expects.

Formula

v4: xxxxxxxx-xxxx-4xxx-Nxxx-xxxxxxxxxxxx v7: tttttttt-tttt-7xxx-Nxxx-xxxxxxxxxxxx t = Unix time in ms (48 bits), x = random, N = 8, 9, a or b (variant) chance of a v4 collision after k UUIDs ≈ k² / 2¹²³

Example

A version 4 UUID might look like 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d: note the 4 at the start of the third group and the 9 (one of 8, 9, a, b) starting the fourth. To reach a 50% chance of a single collision you would need to generate about 2.7 × 10¹⁸ v4 UUIDs, roughly a billion a second for 85 years.

Frequently asked questions

Are UUIDs really unique?

Not guaranteed, but the chance of a random collision is so small it can be ignored in practice. 122 random bits give about 5.3 × 10³⁶ possible version 4 values.

Should I use UUID v4 or v7?

Use v7 for database keys and anything you want sorted by creation time. Use v4 when you don't want the ID to reveal when it was created.

What is the difference between a UUID and a GUID?

They are the same thing. GUID (globally unique identifier) is Microsoft's name for a UUID. GUIDs are often shown in uppercase and wrapped in braces.