DevTools Logo

ULID & NanoID Generator

ULID & NanoID Generator

Generate batches of modern unique IDs — sortable ULIDs or URL-safe NanoIDs

Settings

26-character Crockford base32 ID with a 48-bit millisecond timestamp prefix. Lexicographically sortable.

Examples

Generate 10 ULIDs for database rows

import { ulid } from "ulid"

const ids = Array.from({ length: 10 }, () => ulid())
// '01HXYZ4K8P0000000000000000'  ← sortable by creation time

ULIDs are 26 characters, lexicographically sortable, and safe to use as primary keys in databases that support string IDs.

NanoID with custom alphabet for readable tokens

import { customAlphabet } from "nanoid"

const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', 12)
const token = nanoid() // e.g. 'A3K9FZ2MQ8RT'

A custom alphabet of uppercase letters and digits produces human-readable tokens free of ambiguous characters, perfect for invite codes or short IDs.

Details

ULID (Universally Unique Lexicographically Sortable Identifier) encodes a 48-bit millisecond timestamp plus 80 random bits into 26 Crockford base32 characters. Unlike UUID v4, ULIDs sort chronologically by default, making them ideal for database primary keys. NanoID is a tiny, secure, URL-friendly unique string ID library. Its default 21-character output uses an alphabet of 64 URL-safe characters and provides a collision probability comparable to UUID v4. Both run entirely in your browser — no data leaves your device.

About this tool

Generate batches of modern unique IDs — ULID (sortable, Crockford base32) or NanoID (URL-friendly, configurable size and alphabet). Fast, runs entirely in your browser. ULID & NanoID Generator runs in the browser on DevTools. There is no signup, and your input stays on this device unless the tool explicitly performs a live network lookup.

What this tool does not do

  • ULID & NanoID Generator is a free in-browser utility, not a hosted API. It does not keep server-side history and is not a substitute for production verification in your own stack.

How do I use this tool?

  1. How do I use ULID & NanoID Generator?

    Open ULID & NanoID Generator, enter or paste your input, and copy the result. The page works without an account.