UUID Generator

Make v4 or v7 UUIDs in bulk, and inspect any UUID.

Version

1 to 100 at once.

Letter case

Quick counts

Version 4 (random)

________-____-____-____-____________

A new random version 4 UUID.

Made in your browser with its secure random generator, never on a server.

Fix the highlighted field to update the result.

Check a UUID

Braces, urn:uuid: and missing hyphens are fine. Checked in your browser; never put in the link.

How to use

  1. Choose v4 for fully random IDs or v7 for IDs that sort by creation time.
  2. Set how many you need, from 1 to 100, plus the format and letter case.
  3. Press Generate new, then Copy result to copy them all, one per line.
  4. To check an existing ID, paste it under Check a UUID to see its version, variant and embedded time.

UUIDs are made in your browser with its secure random generator, and the checker never puts what you paste into the page link.

How a UUID works

A UUID is 128 bits, written as 32 hex digits in groups of 8-4-4-4-12 (RFC 9562). Two fields are fixed:

  • the version is the first digit of the third group (4 or 7 here);
  • the variant is the first digit of the fourth group: 8, 9, a or b for standard UUIDs.

Version 4 fills the other 122 bits at random. Version 7 puts the Unix time in milliseconds in the first 48 bits, then a counter and random bits, so IDs made later sort later. That keeps database indexes tidy.

Example

The RFC 9562 sample v7 UUID 017f22e2-79b0-7cc3-98c4-dc0c0c07398f reads like this:

Part Hex Meaning
Timestamp 017f22e279b0 1,645,557,742,000 ms = 2022-02-22 19:22:22 UTC
Version 7 Unix time-ordered
rand_a cc3 12 bits: random here; this tool uses a counter to keep order
Variant 9 Standard (RFC 9562)
rand_b 8c4dc0c0c07398f The rest of the 62 random bits
Collisions, GUIDs and when not to use a UUID
  • Collisions: with 122 random bits, a billion v4 UUIDs have about a 1 in 10¹⁹ chance of containing any repeat (our birthday-bound calculation).
  • GUID is Microsoft’s name for the same thing. The braces style, {…}, is .NET’s “B” format.
  • Not for secrets: RFC 9562 says UUIDs must not be used as security tokens. A v7 UUID also reveals when it was made.
  • Nil and max: all zeros and all ones are special values with no version.

Want to read a v7 timestamp as a date in your time zone? Paste the milliseconds into the Unix timestamp converter.

Frequently asked questions

What is the difference between UUID v4 and v7?

Version 4 is random apart from 6 fixed bits. Version 7 starts with a Unix timestamp in milliseconds, so new IDs sort in creation order, which suits database keys.

Is a GUID the same as a UUID?

Yes. Microsoft calls its implementation of the UUID standard a GUID, and RFC 9562 says UUIDs are also known as GUIDs. The text format is the same.

Can two UUIDs ever be the same?

In theory yes, in practice almost never. By our birthday-bound calculation, a billion random v4 UUIDs have about a 1 in 10¹⁹ chance of containing any repeat.

Should UUIDs be uppercase or lowercase?

Either is valid, and comparisons should ignore case. Lowercase is the common output, from browsers’ randomUUID and .NET, so it is the default here.

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

No. RFC 9562 says UUIDs must not be used as security capabilities. Use a password generator for secrets. A v7 UUID also reveals when it was created.

What are the nil and max UUIDs?

Special values with all 128 bits set to 0 (nil) or to 1 (max). They stand for “no value” and “end of list”, and have no version.