Skip to main content

UUID / ULID generator

Generate cryptographically random UUID v4 or ULID identifiers — entirely in your browser.

Choose a type, set the count, and click Generate. UUIDs use crypto.randomUUID(); ULIDs are time-prefixed and lexicographically sortable. Copy individual IDs or the whole list at once.

UUID and ULID generator

Options

1 – 100

Generated IDs

Click Generate to create IDs.

UUID vs ULID at a glance

Property UUID v4 ULID
Length36 chars (with hyphens)26 chars
SortableNo (random)Yes (by time)
EncodingHexCrockford Base32
Randomness122 bits80 bits
Time componentNone48-bit (ms precision)
DB index perfPoor (fragmented)Good (sequential)

About this tool

Choose between UUID v4 and ULID, set a count between 1 and 100, and click Generate. UUIDs use the browser's built-in Web Crypto API via `crypto.randomUUID()`. ULIDs are 26-character sortable identifiers combining a 48-bit millisecond timestamp with 80 bits of randomness. Copy individual IDs or the entire list with one click.

Frequently asked questions

What is a UUID v4?

UUID (Universally Unique Identifier) v4 is a 128-bit random identifier formatted as 32 hex digits separated by hyphens — for example `550e8400-e29b-41d4-a716-446655440000`. Version 4 means the ID is randomly generated rather than derived from a name or timestamp. UUID v4 is the most common type used in databases, APIs, and distributed systems. The probability of two randomly generated UUIDs colliding is astronomically small — approximately 1 in 5.3 × 10³⁶.

What is a ULID?

ULID (Universally Unique Lexicographically Sortable Identifier) is an alternative to UUID that is designed to sort chronologically. It is 26 characters in Crockford's Base32 encoding — for example `01ARZ3NDEKTSV4RRFFQ69G5FAV`. The first 10 characters encode the current time in milliseconds; the remaining 16 characters are random. Because ULIDs sort lexicographically by creation time, they work well as database primary keys where insertion order matters — unlike UUID v4 which sorts randomly.

UUID v4 or ULID — which should I use?

Use UUID v4 when you need maximum compatibility — it is supported natively by most databases (PostgreSQL has a `uuid` type, MySQL has `UUID()`) and is universally recognised. Use ULID when you want natural chronological ordering in your keys, which improves index performance on B-tree indexes in relational databases and makes debugging easier because IDs issued close together look similar. Both provide sufficient uniqueness for virtually any use case.

Are these IDs safe to use as primary keys?

Yes, with a caveat. UUID v4 keys are random and therefore cause B-tree index fragmentation in databases like PostgreSQL and MySQL over time, which can hurt write performance at scale. ULIDs avoid this because they are monotonically increasing within the same millisecond. If you are using PostgreSQL and concerned about index performance, consider using a UUID v7 (time-ordered UUID) or ULID stored as a `text` or `uuid` column.

Is it safe to generate IDs in the browser?

Yes. This tool uses `crypto.randomUUID()` (UUID v4) and `crypto.getRandomValues()` (ULID random component), which are part of the Web Crypto API — a cryptographically secure pseudo-random number generator (CSPRNG) built into every modern browser. The randomness quality is equivalent to server-side generation. No IDs leave your browser.

Share this tool