ULID, NanoID & Snowflake Generator
Generate sortable, compact, and distributed-friendly IDs — the alternatives to UUID — entirely in your browser.
26 characters, Crockford Base32. The first 10 encode a millisecond timestamp, so ULIDs sort chronologically as plain strings — useful as a primary key where UUID v4 would fragment your index.
Choosing between them:
- ULID when you want database keys that sort by creation time and keep an index compact.
- NanoID when the ID goes in a URL and length matters.
- Snowflake for distributed systems that need ordered 64-bit integer IDs from multiple nodes.
- CUID2 when the ID must not leak a creation timestamp.
Your Data Never Leaves Your Device
Every tool runs entirely in your browser. Nothing you type is uploaded, stored, or logged on our servers.
This generator covers the four common alternatives to UUID, each of which exists to fix a different shortcoming. ULID puts a millisecond timestamp in its first ten characters so IDs sort chronologically as plain strings — random UUID v4 keys scatter across a database index and fragment it, while ULIDs append in order. NanoID is shorter and URL-safe at equivalent collision resistance. Snowflake packs a timestamp, machine id, and sequence into a 64-bit integer for distributed systems. CUID2 deliberately carries no timestamp, for cases where an ID must not leak when a record was created.
The decoder reads the timestamp back out of a ULID or Snowflake — and for Snowflakes, the machine ID and sequence too, which is often the quickest way to work out which node produced a record. Snowflake IDs are handled as strings throughout, because they exceed JavaScript's safe integer range and silently lose precision if treated as numbers. All randomness comes from the browser's crypto API and nothing is transmitted.
FAQ
A ULID embeds a millisecond timestamp in its first 10 characters, so IDs sort chronologically as plain strings. Random UUID v4 keys scatter across a B-tree index and fragment it; ULIDs append in order, which keeps inserts cheap.
The default of 21 characters gives collision odds comparable to UUID v4 while being shorter and URL-safe. Going below about 12 characters raises collision risk meaningfully for high-volume systems.
It is a 64-bit integer, and JavaScript numbers lose precision above 2^53. Kept as a string it survives JSON round-trips intact — silently corrupted Snowflake IDs are a classic bug in JavaScript clients.
For ULIDs and Snowflakes, yes — paste one into the decode box to see its timestamp, and for Snowflakes the machine ID and sequence as well. That is also a reason to avoid them where an ID must not leak timing information.
It uses Crockford Base32, which omits characters easily confused when read aloud or typed, and excludes U to reduce the chance of an ID spelling something unfortunate.
The random portions come from crypto.getRandomValues, the browser's CSPRNG. They are suitable as identifiers, but an ID is not a secret — do not use one as a security token.