wire / identifier / ksuid

KSUID (K-Sortable Unique Identifier)

A KSUID is a 160-bit identifier: a 32-bit Unix timestamp (in seconds, offset to a 2014-05-13 epoch) followed by a 128-bit random payload, rendered as 27 characters of base62. The timestamp prefix makes KSUIDs roughly time-sortable, and the 32-bit second-resolution epoch offset buys over a century of range. Created by Segment.

identifier kind identifier status de-facto verification verified tier B identifier@1

aka: K-Sortable Unique Identifier · Segment KSUID

identifier

spec: KSUID (github.com/segmentio/ksuid)

length 160 bits sortable base62 (0-9 A-Z a-z), fixed 27 characters

example:

0ujtsYcgvSTl8PAuAdqWYSMnLOv

fieldbitsmeaning
timestamp32Unix UTC seconds MINUS the KSUID epoch offset 1400000000 (2014-05-13 16:53:20 UTC).
payload128Cryptographically random payload.

provenance

see also

agent: curl -H 'accept: application/json' wire.phall.io/identifier/ksuid or /identifier/ksuid.json