Skip to content

Tools/ULID / KSUID

ULID / KSUID

Generate time-sortable IDs locally with Web Crypto.

Loading tool…

How to use ULID / KSUID

  1. 1. Pick a kind. ULID and KSUID sort by time. Snowflake needs a worker id. ObjectId matches Mongo.
  2. 2. Set count. Up to 200 values.
  3. 3. Generate. Web Crypto fills the random bits.
  4. 4. Download. Newline-separated file.

About this tool

UUIDv4 is random and painful to index. ULID, KSUID, Snowflake, and ObjectId encode time so new rows roughly append. Generate them here when you are seeding fixtures.

Collision

These are not coordinated with your production generators. Do not mix worker ids casually in Snowflake.

Canonical ULID

Encoding uses Crockford base32. Inspect, don't treat this as a bit-for-bit library clone without tests in your stack.

Code examples

Use

const id = generateUlid();

Frequently asked questions

Related tools

All tools