Skip to content

puidv7

URL-safe typed IDs for humans, time-ordered UUIDv7's for databases

A puidv7 is a Prefixed UUIDv7 which:

  1. Is encoded using Crockford Base32 encoding
  2. Is always lowercase
  3. Contains no hyphens
  4. Has a 3-character alphabetic prefix (a-z)

UUIDv7 is great for databases and distributed systems, but not as great for humans.

The idea of puidv7 is to store UUIDv7 in your database and show puidv7 to your users.

UUIDv7 = 01970a1c-e31e-7422-9cd5-e9651d11cc97
puidv7 = acc06bgm7733st2576nx5jht4ecjw

Best practice: Use puidv7 in URLs, APIs, and user interfaces. Convert back to UUIDv7 for database storage to maintain compatibility with existing UUID tooling and indexing.

Nadrama created puidv7 to be:

URL-safe

Case-insensitive and contains no special characters

Shorter

29 characters vs 36 for UUIDv7

Easy to copy

No hyphens means easier copy & paste

Error-resistant

Crockford swaps O→0 and I/l→1 to avoid misinterpretation

Type-inferrable

Prefix indicates the entity type (great for support teams)

Time-ordered in DB

Leverage UUIDv7’s timestamp-based ordering