UUID generator

Make universally unique identifiers for databases, APIs and test data.

This free UUID and GUID generator works in your browser. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.

v4 or v7?

Version 4Version 7
Made from122 random bitsA millisecond timestamp plus 74 random bits
Sort orderRandomIn order of creation
Best forTokens, IDs that must not reveal timingDatabase primary keys: inserts stay fast because new IDs are added at the end of the index

Both are defined in RFC 9562 (2024). The chance of two random v4 UUIDs colliding is so small that you could generate a billion a second for 85 years before it became likely.

UUID or GUID?

They are the same thing. GUID is Microsoft’s name. Windows tools often show GUIDs in uppercase with braces, which you can switch on above.

Worked example: Inspecting the version and variant bits inside a generated UUID v4

Every Version 4 UUID (RFC 9562, formerly RFC 4122) is a 128-bit value formatted as 32 hexadecimal digits in an 8-4-4-4-12 hyphenated pattern (36 characters total). Look at the fixed bit positions inside a sample output:

f47ac10b-58cc-4372-a567-0e02b2c3d479
              ^    ^
        Version 4  Variant (8, 9, a, or b)
  • 13th hex digit (4 in 4372): Always equals 4 (0100 in binary), identifying the UUID as Version 4 (cryptographically random).
  • 17th hex digit (a in a567): The top two bits are fixed to 10 in binary (10xx), meaning this hex character is always 8, 9, a, or b (identifying the RFC 9562 / Leach-Salz variant).
  • Remaining 122 random bits: Filled directly from crypto.randomUUID() / crypto.getRandomValues(), giving 2^122 = 5.3169 × 10^36 possible unique UUIDs.

Limits and what this tool cannot do

  • Generates random UUID v4 only (not time-ordered UUID v7 or namespace UUID v5): Because UUID v4 is completely random across its first 48 bits, inserting millions of UUID v4 primary keys into a clustered B-tree database index (such as MySQL InnoDB) causes random page splits compared with sequential IDs or timestamp-prefixed UUID v7.
  • Do not use a UUID v4 as a secret authentication token if predictability is checked elsewhere: While crypto.randomUUID() uses a CSPRNG (122 bits of entropy), UUIDs are meant as public collision-free identifiers (user_id, request_id, idempotency_key), whereas session tokens and API keys are usually formatted without fixed version/variant bits.

Questions

Are these UUIDs truly random?

Yes. They use your browser’s cryptographically secure random generator, the same source used for encryption keys.

Can I see when a v7 UUID was made?

Yes. Paste it into the checker; it shows the creation time stored inside.

Are generated UUIDs stored?

No. They are made in your browser and nowhere else.

How many UUID v4s would I have to generate to have a 50% chance of a single collision?

By the birthday paradox (√(2 × ln(2) × 2^122)), you would need to generate approximately **2.71 quintillion** (2.71 × 10^18) UUIDs—equivalent to generating 1 billion UUIDs every second for 85 years—just to reach a 50% chance of one duplicate.

What is the Nil UUID?

The Nil UUID is 00000000-0000-0000-0000-000000000000 (all 128 bits set to zero), used in databases and APIs as a typed sentinel placeholder when no real UUID is assigned.

Should I store UUIDs in PostgreSQL or MySQL as VARCHAR(36) or as a native 16-byte binary type?

In PostgreSQL, always use the native uuid column type (which stores 16 raw bytes instead of 36 ASCII characters and validates format automatically). In MySQL 8+, use BINARY(16) with UUID_TO_BIN() to cut index size by more than half.

Last reviewed .

Related converters and guides