About the ULID and NanoID Generator
UUIDs are long and do not sort by time. This generator makes two popular alternatives. A ULID is a 26 character ID that begins with the time it was created, so IDs sort in the order they were made, which keeps database indexes tidy. A NanoID is a short, URL-safe random ID, 21 characters by default, and you can change its length or give your own set of characters. Choose how many to make, up to 1,000, and copy them as a list. The random part comes from your browser's secure random generator, and nothing is sent anywhere.
Updated October 2026
How to use the ULID and NanoID Generator
- 1Choose ULID or NanoID.
- 2Set how many IDs you want.
- 3For NanoID, set the length and, if you like, your own characters.
- 4Press Generate again for a new batch.
- 5Copy the list or download it as a text file.
Choosing between the two
Use a ULID when the order of creation matters, for example as a database primary key where new rows are added at the end of the index. The timestamp part also makes the ID useful in logs, since you can read when it was made. Within the same millisecond the random part decides the order, so IDs made in the same instant are not guaranteed to sort by creation.
Use a NanoID when you want short, hard-to-guess strings for links, invites, file names or public ids. You can make them even shorter by using a smaller alphabet, but the safety falls with the size, so pick a length that fits the number of IDs you expect.
Choosing a size
- 21 characters from the default 64 symbols gives about 126 bits of randomness.
- 10 characters from the default set gives about 60 bits, fine for small datasets.
- Digits only: 12 digits give about 40 bits, so expect collisions at around a million IDs.
- A ULID has 80 random bits plus the time.
- Always add a unique constraint in the database as a safety net.
Related tools
For standard UUIDs use the UUID Generator, and for raw hexadecimal try the Random Hex Generator The Password Generator is the right choice when the value protects an account, and the Unix Timestamp Converter helps you read the time part of a ULID in seconds. The Hash Generator can turn data into fixed-length digests instead.
Features
- ULIDs with a time prefix that sorts
- NanoIDs with any length from 2 to 256
- Custom alphabets for NanoID
- Lowercase ULID option
- Up to 1,000 at once
- Secure browser randomness
- No upload
Frequently asked questions
What is a ULID?
A Universally Unique Lexicographically Sortable Identifier: 10 characters for a millisecond timestamp followed by 16 random characters, in a Base32 alphabet without confusing letters.
Why use a ULID instead of a UUID?
ULIDs sort by creation time and are shorter in text form, 26 characters against 36. UUID version 4 is fully random and does not sort.
What is a NanoID?
A compact, random, URL-safe ID. The default is 21 characters from 64 symbols, with collision odds similar to a version 4 UUID.
Can NanoIDs collide?
In theory yes, but with 21 characters you would need to create about a thousand IDs an hour for hundreds of millions of years to have a 1 percent chance of one repeat. Shorter lengths collide sooner, so size it to your needs.
Are these IDs secret?
They are unpredictable, but a ULID reveals when it was made. Do not use an ID itself as a password or secret token.
Can I choose my own characters?
Yes. Type the characters you want for NanoID, such as digits only or an alphabet without look-alike letters. Remember a smaller alphabet needs a longer ID for the same safety.
Is the generation really random?
Yes. It uses crypto.getRandomValues, the secure source built into your browser.