UUID / ULID Generator

Generate universally unique identifiers for your applications

Click generate

Format

UUID v4

Length

36 chars

Timestamp

N/A

Understanding Unique Identifiers

Different ID formats and when to use them

UUID v4

Randomly generated 128-bit identifiers. The most commonly used UUID version with extremely low collision probability. Ideal for client IDs, session tokens, and database primary keys.

UUID v7

Time-ordered UUIDs that embed a Unix timestamp in the first 48 bits. They are sortable by creation time, making them excellent for database indexing while maintaining uniqueness.

ULID

Universally Unique Lexicographically Sortable Identifiers. 128-bit compatible with UUID, encoded in Crockford Base32 for a compact 26-character string that is URL-safe and sortable.

Choosing an identifier format

UUIDv4 versus UUIDv7

UUIDv4 is 122 bits of randomness. Unpredictable and collision-free in practice, but random ordering means poor database index locality — inserts scatter across the B-tree, which degrades write performance and bloats indexes at scale.

UUIDv7 puts a millisecond timestamp in the high bits with randomness below. Still globally unique and effectively unguessable, but sorts chronologically, so inserts append to the index rather than scattering. For a new table with UUID primary keys, v7 is usually the better default.

ULIDs

A ULID is 128 bits like a UUID, but encoded in Crockford base32 — 26 characters instead of 36, case-insensitive, and free of the hyphens that make UUIDs awkward in URLs. It is also lexicographically sortable by time.

The tradeoff is ecosystem support: databases have native UUID types with efficient 16-byte storage, and ULIDs usually end up in a char column unless you convert. UUIDv7 gets you most of the ULID benefit while staying in the standard type.

Identifiers are not secrets

A UUID is unique, not confidential. Anything reachable by guessing an identifier needs an authorization check — 'unguessable URL' is not access control, and identifiers leak through logs, referrer headers, and support tickets.

Sequential integers additionally leak volume and ordering, which is a business-intelligence problem more than a security one. UUIDs solve that but don't remove the need to check whether the caller may access the resource.

Frequently asked questions

v7 for database primary keys, because time-ordering gives far better index locality on insert. v4 when you specifically want no information encoded in the identifier, since v7 reveals its creation time to anyone who can read it.

Not guaranteed, but the collision probability for v4 is negligible — you would need to generate billions per second for many years to reach meaningful risk. For every practical purpose they can be treated as unique.

UUIDv4 has enough entropy, but it's better to use a purpose-built random token so nothing about the format implies it is safe to log or expose. Never use v1 or v7 as a secret — both encode a timestamp and v1 may encode a MAC address.

Both are 128 bits. ULIDs use a shorter case-insensitive base32 encoding and sort by time. UUIDs have broader native database support. UUIDv7 offers time-sortability within the standard UUID format, which is often the best of both.

Yes. Values are generated locally with crypto.getRandomValues() and nothing is transmitted.

Identifiers are the easy part of identity

AuthAction assigns stable user, tenant, and organization IDs — plus the RBAC, organizations, and invitations that hang off them.

Free, unlimited users. No credit card required.