Developer · Identifiers
KSUID & ULID decoder.
Paste a KSUID or a ULID and read the time it carries plus the rest of its bytes. Everything runs in your browser.
Identifier
Decoded
Paste an identifier, then press Decode.
Where the time lives
KSUID is 27 base62 characters (0-9, A-Z, a-z) encoding 20 bytes: a 4-byte big-endian timestamp followed by a 16-byte payload. The timestamp counts seconds from a custom epoch of 1400000000 (2014-05-13 16:53:20 UTC), so Unix time is the timestamp plus 1400000000. Because 6227 is larger than 2160, any 27-character string whose value exceeds 2160−1 (larger than aWgEPTl1tmebfsQzFP4bxwgy80V) is rejected. The README example 0uk1Hbc9dQ9pxyTqJ93IUrfhdGq has timestamp 107611700 (2017-10-10 05:01:40 UTC) and payload 9850EEEC191BF4FF26F99315CE43B0C8.
ULID is 26 Crockford base32 characters, which leave out I, L, O and U and are case-insensitive. The first 10 characters are a 48-bit Unix timestamp in milliseconds; the last 16 are 80 bits of randomness. Since 26 characters hold 130 bits, the first character must be 0 to 7 or the timestamp overflows. The spec example 01ARZ3NDEKTSV4RRFFQ69G5FAV decodes to 1469922850259 ms, 2016-07-30 23:54:10.259 UTC.
Sources: segmentio/ksuid (README and reference implementation); ULID specification. The KSUID decoding and the 2160 bound were cross-checked against the independent svix-ksuid library.
Frequently asked questions
How do I convert a ULID to a timestamp?
Paste it above. The first ten characters are decoded as a number of milliseconds since 1970-01-01 UTC and shown as an ISO date and as raw milliseconds.
Why is my KSUID date not in 1970?
KSUIDs count seconds from 2014-05-13, not 1970. The tool adds the 1400000000 offset for you and shows both the raw and the Unix value.
Is the ID sent anywhere?
No. Decoding happens locally in your browser and nothing is stored.
Structure only
This tool decodes the layout of the string. Neither format has a checksum, so it cannot confirm a KSUID or ULID was actually issued by a generator, and the embedded time is whatever the generating system's clock said.