wire / identifier / snowflake-twitter

Snowflake ID (Twitter/X)

A Twitter Snowflake is a 64-bit, roughly time-sortable identifier laid out as: 1 unused sign bit, a 41-bit millisecond timestamp offset from a custom epoch (1288834974657 ms, 2010-11-04), a 10-bit machine id (5-bit datacenter + 5-bit worker), and a 12-bit per-millisecond sequence counter. It fits in a signed 64-bit integer and sorts by creation time, which is why it underpins tweet and many other platform ids.

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

aka: Twitter Snowflake · X Snowflake · snowflake id

identifier

spec: Twitter Snowflake (twitter-archive/snowflake)

length 64 bits sortable decimal uint64 (commonly carried as a string to avoid 53-bit JS float precision loss)

example:

1541815603606036480

fieldbitsmeaning
sign1Unused/reserved most-significant bit, always 0 so the value is a non-negative signed int64.
timestamp41Milliseconds since the Twitter epoch 1288834974657 (2010-11-04 01:42:54.657 UTC).
datacenter_id5Datacenter identifier (part of the 10-bit machine id).
worker_id5Worker/machine identifier (the other half of the 10-bit machine id).
sequence12Per-machine counter incremented for each id within the same millisecond (4096 ids/ms/machine).

provenance

per-fact attribution:

see also

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