BEFORE YOU START

Identifier choice affects sort order, index locality, interoperability, and whether creation time is visible. Uniqueness alone is not the only requirement.

FOLLOW ALONGOpen the live ID Generator workspace
01

List interoperability requirements

Use a standard UUID when APIs, databases, and libraries already expect the 128-bit UUID format.

EXAMPLE
UUID
02

Choose random or time ordered

UUID v4 is random. UUID v7 and ULID expose time ordering, which can improve index locality but also reveals approximate creation time.

EXAMPLE
UUID v4 / UUID v7 / ULID
03

Separate IDs from secrets

Do not rely on an unpredictable-looking identifier for authorization. Use explicit access control and real tokens.

EXAMPLE
id != credential
04

Test storage and collation

Store identifiers in a native or binary type where possible and verify ordering rules in the target database.

EXAMPLE
ORDER BY id
Key takeaways
  • Prefer standards when interoperability matters.
  • Time ordering has both operational benefits and privacy implications.
  • Identifiers are not authorization.