UUID generator

Generate random v4 or time-ordered v7 UUIDs, or inspect an existing UUID.

Runs in your browser. Your input is not uploaded.

Inspect a UUID

What it does

A UUID is a 128-bit identifier written as 32 hex digits in five groups. Version 4 is random. Version 7 starts with a millisecond timestamp, so new IDs sort after old ones, which keeps database indexes compact.

IDs come from the browser’s secure random source. Paste an existing UUID to read its version, variant and, for v1 and v7, the time it was created.

How to use it

  1. Choose the version and how many.
  2. Generate and copy.
  3. Or paste a UUID to inspect it.

Things to watch for

  • A v7 UUID reveals when it was created. Use v4 if that matters.
  • UUIDs are identifiers, not secrets. Do not use them as session tokens or password-reset codes; use a random token instead.

Questions

Should I use UUID v4 or v7?
v7 for database primary keys, because inserts stay in order. v4 when the ID must not reveal a time.
What is the difference between a UUID and a GUID?
None in practice. GUID is Microsoft’s name for the same format.
Can two UUIDs collide?
v4 has 122 random bits. You would need about 2.7 quintillion IDs for a 50% chance of a single collision.
How do I generate one in code?
crypto.randomUUID() in browsers and Node.js gives a v4 UUID.