Skip to content

About

Store UUIDv7 in your database, show puidv7 to your users.

puidv7 is a display/communication format, not a storage format. Your database continues to use standard UUIDv7 columns, which means:

  • Full compatibility with existing UUID tooling and ORMs
  • Efficient B-tree indexing on time-ordered UUIDs
  • No migration needed for existing UUIDv7 data

Convert to puidv7 at the API boundary when sending IDs to users, and convert back to UUIDv7 when receiving them.

The puidv7 project offers libaries/tooling which helps make automatic conversion easier.

How conversion from UUIDv7 to puidv7 works

Section titled “How conversion from UUIDv7 to puidv7 works”
  1. Remove dashes from UUIDv7 to get hex string
  2. Convert hex to Crockford Base32
  3. Lowercase and prepend the 3-character prefix
1. UUIDv7: 01970a1c-e31e-7422-9cd5-e9651d11cc97
2. Hex: 01970a1ce31e74229cd5e9651d11cc97
3. Base32: 06BGM7733ST2576NX5JHT4ECJW
4. puidv7: acc06bgm7733st2576nx5jht4ecjw

Thank you to Nadrama.com for sponsoring this project!