UUID Generator

Generate random UUIDs (GUIDs) online. Create UUID v4 or time-ordered UUID v7 in bulk, in uppercase or without hyphens.

How to generate UUIDs

  1. Choose v4 (random) or v7 (time-ordered).
  2. Set How many – anything from 1 to 1,000 per batch.
  3. Pick a format: Uppercase, No hyphens for a compact 32-character string, or Wrap in braces { } for the style used in Windows registry files and some .NET code. The options can be combined.
  4. Click Copy to put the whole list on the clipboard, or Download .txt to save it with one UUID per line. Generate makes a fresh batch.

Changing any option also produces a new batch rather than reformatting the current one, so copy the list you want before you switch formats.

Anatomy of a UUID

A UUID (universally unique identifier) is a 128-bit number, normally written as 32 hexadecimal digits in five groups: 8-4-4-4-12. Two positions carry fixed information. The first digit of the third group is the version, and the first digit of the fourth group is the variant, which is 8, 9, a or b in all the standard versions defined by RFC 9562, the 2024 standard that replaced RFC 4122.

VersionExampleWhat fills the bits
v43f2c8e91-6b0d-4a57-9c1e-27d4f08b6a3e122 random bits
v7019b76da-a800-7a3c-9f12-5c0e8b4d71e648-bit Unix time in milliseconds, then 74 bits of counter and random data

v4 or v7?

Version 4 is the familiar random UUID and what most libraries produce by default, such as crypto.randomUUID() in JavaScript or uuid.uuid4() in Python. Use it when an ID should reveal nothing and order doesn’t matter: public IDs in URLs, file names, correlation IDs in logs.

Version 7 begins with a timestamp, so IDs created later sort after IDs created earlier, both as text and as bytes. That matters for database primary keys. Inserting random v4 keys into a B-tree index scatters writes across the whole index, while v7 keys arrive in order and are appended near the end, which keeps the index compact and inserts fast. Within one millisecond, this generator uses a 12-bit counter (started at a random value) so that a batch of 1,000 v7 UUIDs is still strictly increasing.

Example: reading the time inside a v7 UUID

Take 019b76da-a800-7a3c-9f12-5c0e8b4d71e6. Its first 12 hex digits, 019b76daa800, are the creation time. Paste them into the hexadecimal box of the Number Base Converter to get 1767225600000, then put that into the Unix Timestamp Converter: it is 1 January 2026, 00:00:00.000 UTC. The same trick tells you when a record was created – and it is also why v7 IDs should not be used where the creation time is private.

How unique is “unique”?

A v4 UUID has 2¹²² possible values, about 5.3 × 10³⁶. By the birthday paradox, you would need to generate roughly 2.7 × 10¹⁸ of them before the chance of even one duplicate reached 50%. A system that creates a trillion v4 UUIDs faces odds of about 1 in 10 trillion that any two are equal. This assumes a good random source; this page uses the browser’s cryptographically secure generator, crypto.getRandomValues. Duplicates in practice come from bugs – a copied seed, a reused list, a mock generator left in production – not from chance.

The other versions, briefly

  • v1 and v6 combine a timestamp with a node identifier, historically the network card’s MAC address. v6 reorders the v1 fields so they sort by time; RFC 9562 recommends v7 for new systems instead.
  • v3 and v5 are not random: they hash a namespace and a name (with MD5 and SHA-1 respectively), so the same name always gives the same UUID.
  • v8 is a container for vendor-specific layouts.
  • The nil UUID is all zeros, 00000000-0000-0000-0000-000000000000, and is often used as “no value”.

Practical tips

  • Store UUIDs in a native uuid column or as 16 bytes of binary where your database offers it, rather than as a 36-character string. Comparisons are faster and indexes smaller.
  • Compare UUIDs case-insensitively. The standard writes them in lowercase, Microsoft tools often in uppercase, and both mean the same value.
  • A hyphen-less UUID is the same number. If a system rejects your value, check whether it expects hyphens or braces before suspecting the ID.

FAQ

Is a GUID the same as a UUID?

Yes. GUID is Microsoft’s name for the same 128-bit format, typically shown in uppercase inside braces: {3F2C8E91-6B0D-4A57-9C1E-27D4F08B6A3E}. Tick both Uppercase and braces to produce that style.

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

Avoid it. A v4 UUID is hard to guess, but it is designed to be an identifier, and many systems print IDs in logs and URLs. A v7 UUID has fewer random bits and reveals its creation time. For secrets, use a purpose-made random token.

Are v7 UUIDs from different machines guaranteed to be in order?

Only as well as the machines’ clocks agree. Ordering is exact within one generator; across servers, IDs created in the same millisecond or under clock drift may interleave.

Why does every UUID here have a 4 or 7 after the second hyphen?

That digit is the version field, and the first digit after the third hyphen is the variant. Both are fixed by the standard, which is why a v4 UUID has 122 random bits rather than 128. They describe how the ID was made, but they cannot prove that the generator’s randomness was any good.