Skip to main content
WizTools123
Free Online Tools

Tool Categories


Developer Tools New Tool

Free Online Short ID Generator, ULID, Nano ID and KSUID

Generate ULIDs, Nano IDs and KSUIDs, one at a time or a thousand at once. ULIDs follow the specification, sort by time and decode back to the millisecond they were made. Nano ID takes any length and alphabet, and shows the collision odds worked out from the birthday problem.

Free Forever Nothing Uploaded Three formats Cryptographic randomness
Free Online Short ID Generator, ULID, Nano ID and KSUID
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
Short ID Generator Everything happens in this tab. Nothing you paste is sent anywhere.
The most recent one

-

Pick a format below.

Length-
Alphabet size-
Random bits-
Timestamp in it-
Decode

Ids
Format
Nano ID
Collision estimate

At that rate, the chance of any two ids ever being the same

Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

Choosing Between Them

What each format is actually good at.

Format Length Sorts by time Use it when
ULID 26 Yes, to the millisecond You want a database key that clusters by insertion time and a value you can read out of a log and turn back into a timestamp.
KSUID 27 Yes, to the second You want the same sortability with a wider random part, and base62 so the value is alphanumeric with no special characters at all.
Nano ID Any No You want the shortest thing that is still safe: a share link, a short code, a public handle for an internal row.
UUID v7 36 Yes, to the millisecond You want ULID behaviour in a format every database, language and tool already has a native type for. Use our UUID tool for these.
UUID v4 36 No You want the boring, universally understood answer and do not care about ordering or length.

One warning about sortable ids in public. Anything that sorts by time carries the time in it, so a ULID or a KSUID in a URL tells anyone who looks when that row was created, and two of them together tell them how fast you are growing. If that matters, a Nano ID is the one to reach for.

How to Generate Short IDs

A few steps, and nothing is uploaded.

1
Pick a format ULID and KSUID sort by time and carry a timestamp. Nano ID is the shortest and carries nothing but randomness.
2
Set the shape For Nano ID, choose a length and an alphabet, or type your own characters. For ULID, decide whether ids made in the same millisecond should be monotonic.
3
Read the odds Type how many ids you expect per hour and the panel works out the collision probability over an hour, a day, a year and a century from the birthday problem.
4
Take the batch Up to a thousand ids, one per line, with copy and download. Press New batch for a fresh set, and paste a ULID into the decode box to get its timestamp back.

What to Know About Short IDs

Including where a UUID is still the better answer.

Against UUID, honestly: v7 does what ULID does, in a format everything already supports. A UUID v7 is also a millisecond timestamp plus randomness, also sorts by time, and has a native column type in most databases. It is 36 characters against ULID's 26. If you are choosing for a database key and not for a URL, v7 is usually the better answer, and our UUID generator makes those.
A short id is not a secret, and shortness costs you randomness. A ten character Nano ID from a 36 character alphabet has about 52 bits of randomness, which is guessable by a determined attacker enumerating values. A UUID v4 has 122. If the id is the only thing standing between a stranger and someone's data, make it long, and put a real authorisation check behind it as well.
Monotonic ordering only holds within this tab. The ULID monotonic rule works by remembering the last id made, so ids generated in two tabs, two browsers or two servers in the same millisecond can still come out in the wrong order relative to each other. Within one process it is exact; across processes nothing short of a coordination service can promise it.
Nothing is stored, so the same id is never repeated here. There is no history and no log. Closing the page loses everything, and pressing New batch discards what was on screen. If you need a batch, copy or download it before you change anything.

Key Features & Capabilities

What this tool does, and what it deliberately does not.

ULID to the specification 48-bit timestamp, 80 bits random, Crockford base32, 26 characters.
Nano ID your way Any length from 4 to 64, six alphabets, or type your own.
Decodes back Paste a ULID or KSUID and get the moment it was generated.
Real collision maths Birthday problem odds over an hour, a day, a year and a century.
Up to a thousand One per line, with copy and download for the whole batch.
Cryptographic source Every byte comes from crypto.getRandomValues, never Math.random.

About the Short ID Generator

A UUID is 36 characters of hyphenated hex, and for a long time that was the only answer to needing an identifier that nobody has to coordinate. Short id formats exist because that answer is awkward in a URL, awkward in a log line, and, in the random version, actively unhelpful as a database key, since consecutive inserts land all over the index.

This page makes the three formats that are worth knowing. ULID and KSUID both put a timestamp at the front, so they sort by creation time and can be turned back into that time, which is why they work well as primary keys. Nano ID is the opposite: no structure at all, just a configurable number of random characters from an alphabet you choose, which is what you want in a share link.

The part that took real care was the collision estimate. The naive answer, dividing a big number by another big number, overflows to infinity the moment the alphabet is large, so the maths here is done in log space and only converted back at the end. The result is an honest set of odds for your own alphabet, your own length and your own rate, rather than the single reassuring number these formats are usually quoted with.

Frequently Asked Questions

Sorting, collisions, alphabets and decoding a timestamp back out.

They do the same job. A UUID v7 is also timestamp plus randomness and also sorts by time, and it fits a native UUID column in Postgres, MySQL and SQL Server, which a ULID does not. ULID wins on length, 26 characters against 36, and on being case-insensitive base32 with no hyphens, which is nicer in a URL. For a database key, v7. For something a person might read out, ULID.

If two ULIDs are generated in the same millisecond, their timestamps are identical and the random parts decide their sort order, which would be arbitrary. The monotonic rule instead takes the previous random part and adds one, so ids made in the same millisecond still sort in the order they were created. It holds within a single process only.

The default of 21 characters from the 64 character url-safe alphabet gives 126 bits, which is more than a UUID v4 and needs no thought. If you want something shorter, use the collision panel on this page: put in your real rate and lengthen the id until the odds over a century look acceptable to you. Below about 12 characters you should be treating the id as guessable.

Because someone will read the id aloud, or copy it off a screen, or a support agent will type it in. The no look-alikes alphabet here drops 0, O, 1, l and I, which cuts transcription mistakes at the cost of a slightly shorter alphabet. It is the right choice for anything a human being touches, and unnecessary for anything only machines will see.

A long Nano ID from a large alphabet is a reasonable unguessable token, since the bytes come from the cryptographic generator. A ULID or KSUID is not, because most of the value is a predictable timestamp and the rest, while random, is presented next to it. Never rely on unguessability alone: authorise the request as well.

Every Other Developer Tool

88 more tools in this set. All free, all in your browser.

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner