ULID Generator
Your new ULID is ready below. ClickTap Copy to use it, or Generate for a fresh one.
- Free, no sign-up
- Follows the official RFC 9562 standard
Need more? Make them in bulkGenerate ULID in bulk
Make up to 10,000 ULIDs at once and save them as a file. Three quick steps.
Enter a number from 1 to 10,000.
What is a ULID?
A ULID is a 128-bit ID that starts with the time it was made, so ULIDs sort in creation order. It is written as 26 characters.
ULID stands for Universally Unique Lexicographically Sortable Identifier. The first 48 bits are the time in milliseconds and the last 80 bits are random. Sort ULIDs as plain text and they come out oldest first.
ULIDs use Crockford Base32: the digits 0 to 9 and the letters A to Z without I, L, O and U, which are easy to misread. The usual form is uppercase, but readers should accept either case. It is the same size as a UUID, so it fits a 16-byte UUID column too.
What a ULID looks like
Here is the ULID you just made, split into its parts. ClickTap Generate above and watch the end change.
- The first 10 characters are the time it was made: 48 bits, in milliseconds since 1970.
- The last 16 characters are random: 80 bits in total.
Its time part says it was made at the moment you opened this page.
When to use a ULID
Good for
- Database keys that should stay in insert order
- Log and event IDs you want to sort by time
- File or object names that list oldest first
- Shorter IDs than a UUID, with no hyphens
Make a ULID in code
import { ulid, monotonicFactory } from 'ulid';
console.log(ulid());
// Strictly increasing, even within the same millisecond:
const next = monotonicFactory();
console.log(next(), next());Uses the ulid package from npm. ulidx has the same functions.
from ulid import ULID
id = ULID()
print(str(id))
print(id.datetime) # when it was madeUses the python-ulid package (pip install python-ulid). You import it as ulid.
import com.github.f4b6a3.ulid.Ulid;
import com.github.f4b6a3.ulid.UlidCreator;
Ulid id = UlidCreator.getMonotonicUlid();
System.out.println(id.toString());Uses the ulid-creator library (com.github.f4b6a3) from Maven Central.
var id = Ulid.NewUlid();
Console.WriteLine(id.ToString());Uses the Ulid package from NuGet, by Cysharp. .NET has no built-in ULID.
import "github.com/oklog/ulid/v2"
id := ulid.Make()
fmt.Println(id)Uses the oklog/ulid package. Make() is monotonic within a millisecond.
use ulid::Ulid;
let id = Ulid::new();
println!("{id}");Uses the ulid crate.
ULID vs UUID v7, UUID v4 and Nano ID
Questions people ask
Should I use a ULID or a UUID v7?
Both start with a 48-bit millisecond time, so both sort by creation time. UUID v7 is part of the UUID standard and works with UUID columns and libraries as is. A ULID is shorter as text. If your database has a UUID type, UUID v7 is usually the easier choice.
What happens if I make many ULIDs in the same millisecond?
In monotonic mode, the random part goes up by one for each new ULID in that millisecond, so they stay in order. Bulk lists on this page work this way: each ID is strictly greater than the one before.
Does a ULID show when it was made?
Yes. Anyone can read the time from the first 10 characters. Do not use ULIDs where the creation time should stay private. Use UUID v4 instead.
Why are there no I, L, O or U characters?
ULIDs use Crockford Base32, which leaves those letters out. I, L and O are easy to confuse with 1 and 0, and dropping U makes rude words less likely.
Can I store a ULID in a UUID column?
Yes. A ULID is 128 bits, the same as a UUID, so many libraries can convert it to 16 bytes or a UUID string. The stored value will not look like the 26-character text. Databases that compare UUIDs byte by byte, like PostgreSQL, keep the same sort order.


