KSUID Generator
Create K-Sortable Unique Identifiers as 27-character Base62 strings for distributed IDs.
Generate K-Sortable Unique Identifiers (KSUID)
KSUIDs are 27-character Base62 strings used as sortable, unique IDs in distributed systems. Each identifier embeds a 32-bit Unix timestamp in the first four bytes and 128 bits of randomness, so newly generated IDs sort chronologically when compared lexicographically.
Generate up to 100 KSUIDs per refresh, copy them as plain lines or a JSON array, and inspect the ISO timestamp decoded from the first ID. Random bytes come from crypto.getRandomValues in the browser.
Related: ULID Generator, Nanoid Generator.
Frequently Asked Questions
How is a KSUID different from a UUID?
UUID v4 is random and not time-sortable. KSUIDs prefix randomness with a timestamp, so sorting IDs as strings roughly orders them by creation time.
What alphabet is used?
Standard KSUID Base62: 0-9A-Za-z (62 characters), producing fixed 27-character strings.
Are these IDs cryptographically secure secrets?
No. Treat them as unique, sortable identifiers, not passwords or session tokens.