Start here
Ten type-safe ID strategies behind one API, with the fastest implementation of each in our current CI benchmark.
uniku collects ten ID generation strategies behind one consistent, type-safe API: UUID v4/v7, ULID, TypeID, Nanoid, CUID v2, KSUID, ObjectID, XID, and TSID. In the current CI benchmark, every generator beats its dedicated npm alternative. Each strategy still has its own entry point, so your application ships only the code it imports.
Install uniku
Generate your first ID in one import.
Compare ten strategies
Choose a format by the job it needs to do.
See the benchmarks
Compare every generator with its dedicated npm alternative.
Browse integrations
Start with runnable Hono, Drizzle, and Effect examples.
Use the CLI
Generate, inspect, and validate without writing a script.
Migrate to uniku
Move from a familiar ID package without changing stored identifiers.
The library contract
Every generator import returns a callable function with precise TypeScript signatures and the helpers that make sense for its format, such as isValid(), toBytes(), fromBytes(), or timestamp(). The library is ESM-only, built on web standards, and tested end to end across Node.js, Bun, Deno, browsers, and Cloudflare Workers. The stability contract defines the entry points, validation boundaries, and runtime support policy that take effect with uniku@1.0.0.
A CLI companion is available
Install @uniku/cli when you need an ID in a terminal, migration, or shell pipeline. It shares the library's formats but has its own release lifecycle.