Skip to content

Developers

ULID & NanoID Generator

ULID & NanoID Generator

Beta

Generate ULIDs, 26-character time-sortable ids, or NanoIDs, short URL-safe ids with a custom alphabet and length. Batches of up to 100, crypto-random, in your browser. No signup.

Use via API
  • Free, no sign-up
  • REST + MCP
  • Updated
  • Reviewed by Olgun Ozoktas

Options

A ULID is 26 Crockford base32 characters: 48 bits of millisecond time, then 80 random bits. IDs made in the same batch sort by creation time.

5 generated

How to generate a ULID or NanoID

  1. Pick the id type

    Choose ULID for time-sortable ids or NanoID for short URL-safe ids. A batch appears at once.
  2. Set the batch and the shape

    Enter how many ids you need, up to 100. For NanoID, set the length and edit the alphabet if you need digits only or no look-alike letters.
  3. Generate again if needed

    Click Generate again for a fresh batch. Each click draws new random bits.
  4. Copy the list

    Click Copy all to put the ids on your clipboard, one per line, ready for a fixture file, a spreadsheet or a database seed.

Common use cases

Database primary keys

ULIDs keep inserts at the end of a B-tree index and let you paginate by id without a separate created_at column.

Short links and invite codes

NanoIDs of 8 to 12 characters from a readable alphabet make codes people can type from a printed card.

Test fixtures

Generate a batch of ids for seed data, then paste them into a fixture file or a migration.

Log correlation

A ULID per request sorts by time in a log search, so a trace reads in order without a timestamp column.

Why use a ULID or NanoID instead of a UUID?

A UUID v4 is random, so a database that indexes by it inserts in random places and its B-tree fragments. A ULID puts a millisecond timestamp first and sorts by creation time, which keeps inserts at the end of the index and makes the id useful in a URL or a log line. A NanoID is the opposite trade: it is short, URL-safe by default, and lets you pick the alphabet and length when a 36-character UUID is too long for a share link or a coupon code. This page makes both, in batches, from the same modules the REST API and the MCP server run.

The ULID & NanoID Generator makes the two ids developers reach for when a UUID does not fit. A ULID is 128 bits written as 26 Crockford base32 characters, a millisecond timestamp first and 80 random bits after, so ids sort by creation time as plain strings. A NanoID is short and URL-safe by default, with an alphabet and a length you choose, so it fits a share link or a coupon code.

Both come from the same modules that run behind the REST tools ulid-generate and nanoid-generate and the MCP tools ulid_generate and nanoid_generate, so a batch made here matches a batch an agent makes. The random bits come from the Web Crypto API on every surface.

For the standard 36-character form, the UUID Generator makes v4, v7, v1 and nil UUIDs; its v7 sorts by time like a ULID.

How it compares

Language libraries make these ids well, but a page is faster for a fixture file or a one-off code, and a batch of 100 is one click. Other online generators often make one id at a time, pin the NanoID alphabet, or use Math.random. This page makes batches, lets you edit the alphabet and length, uses crypto random on every surface, and exposes the same functions through a REST endpoint and an MCP server.

It does not implement the optional monotonic ULID mode, and it says so; two ids from the same millisecond are unordered between themselves.

Tips

  • Lengthen a NanoID when you shrink its alphabet; the collision odds depend on both.
  • Store ULIDs as text or as 16-byte binaries; both sort correctly, the binary form uses less space.
  • Do not use a ULID as a secret: its first ten characters are the creation time.
  • Use the REST tool to generate ids inside a script instead of copying from the page.
  • For a 36-character standard id, the UUID Generator's v7 sorts by time like a ULID.

Frequently Asked Questions

What is a ULID?

A Universally Unique Lexicographically Sortable Identifier: 128 bits, written as 26 characters of Crockford base32 (no I, L, O or U, so it reads well aloud). The first 48 bits are a millisecond Unix timestamp, the remaining 80 are random. Two ULIDs made a millisecond apart sort in creation order as plain strings.

What is a NanoID?

A short random id in the style of the npm nanoid package: each character is drawn from an alphabet with cryptographically secure random bytes. The default is 21 characters from a 64-character URL-safe alphabet, which gives collision odds comparable to a UUID v4 in a third of the length.

When should I use a ULID and when a NanoID?

Use a ULID for database keys, event ids and anything you want to sort or paginate by time without a separate timestamp column. Use a NanoID for short links, invite codes, public handles and anywhere length or a specific alphabet matters. Neither should be a secret on its own.

Can I choose the NanoID alphabet and length?

Yes. Edit the Alphabet field (at least two characters) and set the length from 2 to 256. A digits-only alphabet gives numeric codes; removing look-alike letters gives codes that are easy to read over the phone. The collision odds fall as the alphabet shrinks or the length drops, so lengthen the id when you shorten the alphabet.

Are the ids cryptographically random?

Yes. Both generators take their random bits from the Web Crypto API (crypto.getRandomValues), in your browser on this page and in the runtime on the REST and MCP surfaces. Nothing is seeded from the clock except the ULID timestamp, which is public by design.

Does the ULID & NanoID Generator require a signup?

No. It is available with no signup and no usage limits. The ids are generated in your browser, so none of them are stored or sent anywhere.

Can I generate ids from a script or an AI client?

Yes. The same functions are the REST tools ulid-generate and nanoid-generate at api.findutils.com and the MCP tools ulid_generate and nanoid_generate at mcp.findutils.com. ULID takes a count and an optional timestamp; NanoID takes a count, a size and an alphabet.

Do ULIDs made in the same millisecond stay sorted?

Not in this generator. The ULID specification has an optional monotonic mode that increments the random part within one millisecond; this tool draws fresh random bits for each id, so two ids from the same millisecond share a prefix but are not ordered between themselves. Across milliseconds they always sort correctly.

Is a ULID or NanoID a good secret token?

A NanoID of 21 or more characters from the default alphabet has about 126 bits of randomness and works as a session token or a one-time link. A ULID exposes its creation time and has 80 random bits, so keep it as an identifier, not a secret.

How do I make a UUID instead?

Open the UUID Generator, which makes random v4, time-ordered v7, time-based v1 and nil UUIDs in the standard 36-character form. v7 and ULID solve the same sorting problem; pick by the format your database and libraries expect.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool