UUID Generator

Runs locally

Bulk UUID v4 and v7, ULID and Nano ID from the browser's crypto source.

v4: 122 random bits. The right default when IDs need not sort.

Generated

Inspect an ID

Paste a UUID (any version, with or without hyphens, braces or urn:uuid:) or a ULID.

Guide

Which identifier to generate

A UUID is 128 bits written as 32 hexadecimal digits in five groups (8-4-4-4-12). RFC 9562, which replaced RFC 4122 in 2024, defines the versions: the digit after the second hyphen says which one you have. Version 4 is 122 random bits, the safe default when nothing about the ID needs to mean anything. Version 7 puts the Unix time in milliseconds in the first 48 bits, so IDs sort in creation order — which keeps database indexes compact — at the cost of revealing when each ID was made. The UUID v7 generator shows its layout bit by bit.

ULID is a separate format with the same idea as v7: 48 bits of time and 80 of randomness, written as 26 Crockford base32 characters that sort as text and avoid easily confused letters. Nano ID trades the fixed format for a shorter URL-safe string; 21 characters carry about as much randomness as a v4. The nil UUID (all zeros) and max UUID (all f) are reserved values, useful as "none" and "end of range" sentinels.

Every ID here comes from crypto.getRandomValues, the same generator browsers use for keys, never Math.random. The inspector reads any UUID with or without hyphens, braces or a urn:uuid: prefix. For time-based versions it decodes the embedded timestamp — v1 and v6 count 100-nanosecond steps since 15 October 1582, v7 counts milliseconds since 1970 — and you can open that time in the Timestamp Converter.

Inspect

C232AB00-9414-11EC-B3C8-9F6BDECED846

Result

Valid UUID v1 — time-based (Gregorian, with node ID)
Canonical  c232ab00-9414-11ec-b3c8-9f6bdeced846
Variant    RFC 9562 (the standard one)
Created    2022-02-22T19:22:22.000Z

The example v1 UUID from RFC 9562. Its time fields are stored low-order first, which is why v1 IDs do not sort by time and v6 and v7 were added.

Where people get caught

Assuming a UUID is secret

A v4 is hard to guess, but a v7 or v1 reveals its creation time, and v1 can include a MAC address. Do not use any UUID as a password-reset or session token; use a random secret for that.

Case and hyphens in comparisons

The canonical form is lowercase with hyphens, but systems accept uppercase and bare hex. Normalise before comparing strings, or store UUIDs in a native uuid column.

Random v4 keys in a clustered index

Inserting random keys into a B-tree touches pages all over the index. On large MySQL (InnoDB) or SQL Server tables, time-ordered v7 keys insert faster and fragment less.

Storing UUIDs as 36-character strings

A text column takes 36 bytes plus overhead; a binary or native uuid type takes 16. Use PostgreSQL uuid, MySQL BINARY(16) or SQL Server uniqueidentifier.

About UUIDs

How it works in 4 steps · 4 common use cases · 4 questions answered

How it works

  1. 1.Choose UUID v4, UUID v7, ULID, Nano ID or the nil and max values.
  2. 2.Set how many (up to 1,000), and the case and hyphens for UUIDs.
  3. 3.Copy one, copy all, or download .txt, .csv or .json.
  4. 4.Paste any ID into the inspector to check its version and timestamp.

Common use cases

  • •Seeding test fixtures and mock rows with unique keys
  • •Choosing between v4 and v7 for a new table’s primary key
  • •Finding out when a v7 ID or ULID in a log was created
  • •Generating idempotency keys or correlation IDs while testing

FAQ

What is the difference between UUID v4 and v7?

v4 is entirely random. v7 starts with a millisecond Unix timestamp followed by random bits, so v7 IDs sort by creation time and insert efficiently into database indexes, while revealing when they were made.

Are these UUIDs random enough for production?

Yes. They come from crypto.getRandomValues, the browser’s cryptographic random number generator, and follow the RFC 9562 layout exactly.

Can two UUIDs collide?

In practice, no. With 122 random bits you would need to generate about 2.7 quintillion v4s for a 50% chance of a single collision.

What is a ULID?

A 128-bit ID with a 48-bit millisecond timestamp and 80 random bits, written as 26 Crockford base32 characters. It sorts as text, like UUID v7, but is not a UUID.