Design goals
View this section in the spec ↗UUID gaps TNIDs close
- Kind: a 20-bit name says what the TNID identifies:
user.…. - Types: the name gives a type system something to check.
- Strings: one UUID value has several hex spellings, and JS, JSON and URLs compare strings. A TNID has one canonical string, so comparing strings matches comparing values. TNIDv0 (spec: variant 0) orders by creation time per name.
- Backwards compatible with UUIDs: every TNID is a valid UUIDv8.
Costs
The name spends 20 bits (4 characters × 5 bits), leaving 100 payload bits. The spec targets "99% of use cases." Names over 4 characters MUST be rejected; TNIDv1 has 100 random bits.
For when an application should pick another format, see the Guide: When to use another ID format.