CraftTools

ULID & NanoID Generator

Guide: UUID, ULID and NanoID: Which Unique ID Should You Use?

Nothing you enter or choose here leaves your device. This tool runs in your browser.

Two kinds of identifier

A ULID is 26 characters long and starts with the time it was made, so a list of them sorts in creation order. A NanoID is a short random string with no pattern, built to be compact and URL-friendly. Choose by what you need the ID to do.

ULIDNanoID
Example01HF7YAT00BA9ET27H7DP6JCEMA random string of 21 characters
Length26 characters, fixed21 by default, you choose
Sorts by timeYesNo
Reveals creation timeYesNo
CharactersCrockford Base32, no I, L, O or ULetters, digits, underscore and hyphen, or your own
Good forDatabase keys, logs, eventsShort links, public ids, tokens that shouldn't expose timing

Inside a ULID

The first 10 characters are a millisecond timestamp, and the last 16 are random. In the example, the prefix 01HF7YAT00 stands for 1700000000000 milliseconds, which is 14 November 2023 at 22:13:20 UTC. Two IDs made in different milliseconds always sort in the right order, and the random part separates IDs made in the same one.

Choosing a NanoID length

How hard a NanoID is to guess depends on the length and on how many characters you allow. Each character carries log base 2 of the alphabet size in bits. The default, 21 characters from 64, gives about 126 bits, similar to a random UUID. If you change the alphabet, change the length to match:

AlphabetLengthStrength
64 characters (default)21About 126 bits
Letters and digits (62)16About 95 bits
Lowercase and digits (36)12About 62 bits
Digits only (10)10About 33 bits, not safe for secrets

Short numeric codes are fine for something like an order number that nobody can exploit, but poor as a hidden link or a reset token. Identifiers aren't passwords in either case.

Using custom characters

Type the characters you allow in the NanoID box. Dropping look-alikes such as 0, O, 1 and l makes codes easier to read aloud. Removing vowels avoids spelling accidental words. Fewer characters mean you need a longer ID for the same strength.

Are they secure?

They're generated with your browser's secure random generator, the same one used for encryption keys, and nothing is sent anywhere. A ULID reveals when it was created, and neither type is meant to stand in for a password or the sole protection on a private link.

For the standard 36-character identifiers, use the UUID generator, and the guide to UUID, ULID and nanoid compares all three. To see how a ULID is encoded, the Base32 encoder shows the alphabet, and the timestamp converter turns the time part into a date.

Written by Akinrinmade Michael · Updated October 24, 2026

How to use

  1. 1Choose ULID or NanoID.
  2. 2Set how many and, for NanoID, the length and characters.
  3. 3Copy your IDs.

Frequently asked questions

Are the IDs secure?

They use your browser's secure random generator, the same one used for encryption keys.

What is a ULID?

A 26 character ID that starts with the time, so IDs sort in the order they were made.

What is a NanoID?

A short random ID. The default is 21 characters from letters, numbers, _ and -.

Can I use my own characters?

Yes. Type the characters you want in the NanoID box.

Are the IDs sent anywhere?

No. Everything runs in your browser, so what you paste never leaves your device.

Read the guide

Learn how this works and how to get the most from it.

Developer

UUID, ULID and NanoID: Which Unique ID Should You Use?

How UUID v4, UUID v7, ULID and NanoID differ, why sortable IDs help databases, and how to pick the right one for your project.

3 min read

UUID & Random Number Generator

Generate secure UUIDs (v4, v7) and random numbers.

Hash Generator

Generate MD5, SHA-1, SHA-256 and SHA-512 hashes and HMACs.

Password Generator

Create strong random passwords or passphrases, one or many at a time.

Base32 Encoder / Decoder

Encode and decode Base32, including hex and Crockford.