Encodings
View this section in the spec ↗An encoding maps one part of the 128-bit value to characters of the TNID string, <name>.<data>. The spec defines two, one per part; UUID hex, bytes and integers are representations, not encodings.
| Encoding | Encodes | Alphabet / width | Why this one |
|---|---|---|---|
| Name | 20 name bits ↔ the 1–4 characters before the . | null, 0–4, a–z; 5 bits | A human-chosen, readable label: 32 symbols fit 4 characters into 20 bits |
| Data | 102 data bits (TNID variant + payload) ↔ the 17 characters after the . | -, 0–9, A–Z, _, a–z; 6 bits | Arbitrary bits, packed densely: 102 = 17 × 6, no padding |
Composition
user.Br2flcNDfF6LYICnT = d6157337-0ebc-8686-83ab-4075a34cdcde:
| Part | In the value | In the string | Encoding |
|---|---|---|---|
| Name | 20 bits, d6157 | user | Name |
| Separator | . | ||
| Data | 102 bits: TNID variant + payload | Br2flcNDfF6LYICnT | Data |
| UUID version, variant | 6 constant bits | Omitted |
Sort order matches bit order
Value order is ASCII order in both alphabets, so sorting strings byte by byte sorts the bits. A TNID string therefore sorts like its 128-bit value.
URL safety
Both alphabets and the . are unreserved characters (RFC 3986 §2.3): no percent-encoding in URL paths, queries or fragments.