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.
-
Pick a format below.
| Length | - |
|---|---|
| Alphabet size | - |
| Random bits | - |
| Timestamp in it | - |
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
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.
What to Know About Short IDs
Including where a UUID is still the better answer.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
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.
Every Other Developer Tool
88 more tools in this set. All free, all in your browser.