Inspect a KSUID
The default example comes from the upstream KSUID project. Its timestamp is 2017-10-10T04:00:47Z and its payload is b5a1cd34b5f99d1154fb6853345c9735.
Preserve the encoded value
KSUID is case sensitive. The decoder uses integer arithmetic and rejects encoded values outside the 160-bit range. The timestamp is supplied by the generator’s clock and is not proof of when an event occurred.
Frequently asked questions
How does KSUID differ from ULID?
KSUID is 20 bytes: a 32-bit seconds offset from Unix time 1400000000 and a 128-bit payload, encoded as 27 Base62 characters. ULID is 16 bytes, with a millisecond timestamp and an 80-bit payload, encoded as 26 Base32 characters.
Are IDs generated in one second ordered?
Not by creation order. The timestamp portion is the same within one second and the payload is random. Lexicographic sorting groups IDs by timestamp, while IDs within that second sort by payload. Keep Base62 case intact and use a case-sensitive binary collation.