Generate UUID v4, ULID, or NanoID identifiers using cryptographically secure randomness from the Web Crypto API. Three formats because they solve different problems.
SponsorThis spot is open to one DevOps or AI tooling company at a time. Ask about sponsoring
116 of 118 run entirely in your browser (Weather Widget uses Open-Meteo; What's My IP asks this site's server).
Share on XShare on LinkedInThe choice matters more than it looks. UUID v4 is 128 bits of pure randomness: universally supported, and terrible as a primary key in a B-tree index because inserts land in random pages and fragment the index. ULID keeps the same 128 bits but leads with a 48-bit timestamp, so identifiers sort chronologically and insert sequentially, which is dramatically kinder to Postgres and MySQL indexes.
NanoID is the compact option: 21 characters against UUID's 36, URL-safe, with collision odds comparable to UUID v4 at realistic volumes. Reach for it when the identifier is going in a URL and length is user-visible.
Generate cryptographically secure unique identifiers. UUIDv4, ULID (time-sortable), or NanoID (URL-safe, compact).