Skip to content
koducathome

UUID Generator

Generate UUID v4, time-ordered v7 and name-based v5 identifiers, ULIDs and NanoIDs in bulk, and validate existing UUIDs.

How to use this tool

Steps for using the UUID Generator.

  1. Pick an ID type: UUID v4 (random), UUID v7 (time-ordered, ideal for database keys), UUID v5 (name-based and repeatable), ULID (26-character, time-sortable), NanoID (short random string) or Nil. New IDs are generated as soon as you change a setting.
  2. Set How many (1–1000) or use the quick buttons. For v5, choose a namespace and enter one name per line — the same name always gives the same UUID. For NanoID, choose the length and alphabet.
  3. Toggle Uppercase, Hyphens and Braces for UUIDs, and choose Output as one per line, a JSON array, a CSV column, SQL VALUES rows or a quoted list.
  4. Use Copy all or Download, or switch to List to copy single IDs. Click Generate for a fresh batch.
  5. Paste any UUID or ULID into Validate or inspect to see whether it is valid, its version and variant (highlighted in the ID), and the time embedded in v1, v6, v7 UUIDs and ULIDs.

Example

Inspect a UUID v7

UUID
017F22E2-79B0-7CC3-98C4-DC0C0C07398F
Inspection
Valid — Version 7 (Unix time-ordered)
Canonical form: 017f22e2-79b0-7cc3-98c4-dc0c0c07398f
Variant: RFC 9562 / RFC 4122
Embedded time: 2022-02-22T19:22:22.000Z (UTC) · 1,645,557,742,000 ms since epoch

Common use cases

  • Creating primary keys for database rows, with v7 for index-friendly ordering.
  • Generating idempotency keys or correlation IDs for API requests and logs.
  • Seeding test fixtures and mock data with unique identifiers.
  • Checking whether a value from a log or database is a well-formed UUID and which version produced it.
  • Finding out when a v7 (or v1/v6) UUID was created from its embedded timestamp.

UUID v4 vs v7

A UUID is a 128-bit identifier written as 32 hexadecimal digits in groups of 8-4-4-4-12. Two fields are fixed by the standard (RFC 9562, which replaced RFC 4122 in 2024): the first digit of the third group is the version, and the first digit of the fourth group encodes the variant — 8, 9, a or b for standard UUIDs. Everything else depends on the version.

Version 4 fills the remaining 122 bits with random data. This tool uses crypto.randomUUID() where available and otherwise builds the UUID from crypto.getRandomValues. With 122 random bits, you would need to generate about 2.7 × 10^18 UUIDs before reaching a 50% chance of a single duplicate, so v4 values can be created independently on any machine without coordination.

Version 7 starts with a 48-bit Unix timestamp in milliseconds, followed by the version, a 12-bit sequence field and 62 random bits. Because the timestamp comes first, v7 UUIDs sort in creation order as strings and as bytes. That keeps database B-tree indexes compact and inserts fast, which is why v7 is increasingly preferred for primary keys. This generator also keeps values strictly increasing within the same millisecond by using the sequence field as a counter seeded with random bits, as RFC 9562 describes.

UUIDs are identifiers, not secrets. A v4 UUID is hard to guess, but it is not designed as an access token, and a v7 UUID reveals when it was created — the inspector shows that timestamp. Version 1 UUIDs can also reveal the MAC address of the machine that generated them. For password-like secrets use the Password Generator, and read the UUID guide for advice on choosing a version.

Limitations

  • Generates v4 and v7 only; v1, v3, v5 and v6 can be inspected but not generated.
  • Up to 1000 UUIDs per batch.
  • v7 ordering is guaranteed within this page; UUIDs generated on different machines are ordered only as accurately as their clocks.
  • Timestamps shown for v1 and v6 are rounded to milliseconds.

Frequently asked questions

Should I use UUID v4 or v7?

Use v7 for database primary keys and anything that benefits from time ordering. Use v4 when the identifier should reveal nothing about when it was created. Both are equally unique in practice.

Can two generated UUIDs ever collide?

In theory yes, in practice no: v4 has 122 random bits and v7 has 74 bits of randomness and sequence per millisecond. Collisions are only a realistic concern when the random number generator is broken, which is why this tool uses the browser's cryptographic generator.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit format. Windows tools often display GUIDs in uppercase with braces — use the Uppercase and Braces options to match.

What are the Nil and Max UUIDs?

The Nil UUID is all zeros (00000000-0000-0000-0000-000000000000) and the Max UUID is all f digits. Both are special values defined by RFC 9562, often used as placeholders or range bounds; the inspector recognises them.

Are UUIDs safe to use as secret tokens?

Not as a rule. UUIDs are designed to be unique, not unguessable, and v7 exposes its creation time. For session tokens or API keys, use at least 128 bits from a secure random generator encoded as Base64url or hex.