admin@likeapro.dev: ~/uuid — zsh

// admin tools · 04

ID factory

Bulk UUID v4, timestamp-ordered UUID v7 (RFC 9562), ULID and nanoid — then paste any UUID or ULID back in to see its version, variant and embedded timestamp.

// runs locally — nothing is uploaded

type

output

GENERATE local only · 0 bytes sent --:--:--

How it works

What it does

Bulk-generates unique identifiers in four formats — UUID v4, UUID v7, ULID and nanoid — and decodes any UUID or ULID to show its version, variant and embedded timestamp. IDs are generated with crypto.getRandomValues in your browser and are never sent anywhere.

How to use it

  1. In --generate, pick a type and a count from 1 to 500.
  2. For UUIDs, choose a format: lowercase, uppercase, {braces}, no hyphens or a urn:uuid: prefix. For nanoid, set the size and alphabet. For ULID, toggle monotonic mode.
  3. Copy all, or download a .txt file. Version, variant and timestamp bits are colour-coded.
  4. Paste any UUID or ULID into --decode to break it into fields and read its creation time.

The formats compared

UUID v4
122 random bits with fixed version and variant bits (RFC 9562). The safe default for opaque IDs.
UUID v7
48-bit Unix millisecond timestamp, then 74 random bits. IDs sort by creation time, which keeps database B-tree indexes compact. This is the modern choice for primary keys.
ULID
48-bit millisecond timestamp plus 80 random bits, written as 26 Crockford base32 characters. Sortable and URL-safe, with no hyphens.
nanoid
A compact random string over a configurable alphabet. The default 21 characters of A-Za-z0-9_- give about 126 bits.

How generation works

UUID v7 here follows RFC 9562's monotonic method: within the same millisecond, the random portion is increased by a random step instead of re-rolled, so IDs generated in a burst still sort in order. Monotonic ULIDs increment the random part by one within a millisecond. nanoid maps random bytes onto your alphabet with rejection sampling, so no character is more likely than another.

The decoder recognises versions 1–8, the nil and max UUIDs, and Microsoft GUID variants. It extracts timestamps from v1, v6 and v7 UUIDs and from ULIDs. Common Crockford typos (I, L, O) are accepted in ULIDs.

FAQ

Should I use UUID v4 or v7 for database keys?

v7 for most new tables. Random v4 keys scatter inserts across an index, while v7's time prefix appends them near the end, which is faster and smaller. Use v4 when you don't want creation time visible in the ID.

Can two generated UUIDs collide?

In practice, no. With 122 random bits you would need to generate billions of v4 IDs per second for many years before a collision became likely, provided the generator is cryptographically random, as it is here.

Does a v7 UUID leak information?

It reveals its creation time to the millisecond — the decoder shows exactly that. The rest is random, so it doesn't identify the machine the way v1's MAC-address node field can.