01What is ID Generator?
Picking an ID format for a new table is one of those decisions you live with for years. This page lets you generate six common formats side by side and look at their structure before you commit to one. You choose CUID2, NanoID, ULID, ObjectID, Snowflake or KSUID, set a batch of 1, 5, 10, 25, 50 or 100, and click Generate. Here is what each one really does in our code. CUID2-format IDs are 24 characters: a random lowercase letter, then 23 base36 characters. They have the same shape as output from the @paralleldrive/cuid2 package, but the real library hashes time, a counter and a host fingerprint with SHA3. We fill the characters straight from the browser's secure random source instead. If your app needs genuine CUID2, install the package. NanoID uses the default 21-character alphabet of 64 URL-safe symbols, which gives about 126 random bits. ULID follows the public ULID spec: 10 Crockford Base32 characters of millisecond time, then 16 random characters. Because time comes first, ULIDs sort by creation order as plain strings. ObjectID follows MongoDB's BSON layout. You get a 4-byte Unix timestamp in hex, 5 random bytes that stay fixed while the page is open, and a 3-byte counter that starts at a random value and counts up. Snowflake uses Discord's documented layout and its epoch of January 1, 2015: 42 bits of milliseconds, a 5-bit worker, a 5-bit process and a 12-bit sequence. There are no real workers in a browser tab, so those two fields are random here. KSUID packs a 4-byte timestamp, counted in seconds from May 13, 2014, with 16 random bytes and encodes the 20 bytes as 27 base62 characters. A quick worked example. Generate a ULID at midnight UTC on November 25, 2026 and the first ten characters are 01M8801200. An ObjectID from that same second starts with 6b062500. The rest of each ID is random, so it changes every click. The Format Breakdown panel splits the newest ID into labelled parts. The Format Comparison table shows one sample per format with length, sortability and collision notes. Your last 500 IDs stay in a list you can copy or clear. Limits worth knowing: ULID here does not do the spec's monotonic increment inside one millisecond, so two ULIDs from the same millisecond may not sort in generation order. IDs are made with your browser's crypto API and never leave the tab.
Backend developers choosing a primary key format who want to see ULID, KSUID, ObjectID and Snowflake structure side by side before writing a schema. The tool runs entirely in your browser, so your data never leaves your device.
02How to use ID Generator
- Under ID Format, pick CUID2, NanoID, ULID, ObjectID, Snowflake or KSUID
- Set Quantity to 1, 5, 10, 25, 50 or 100
- Click Generate and read the Format Breakdown for the newest ID
- Open Format Comparison to see one sample of each format next to its length and sortability
- Copy one ID with its icon or use Copy All, then clear the history when you're done
03Worked examples
- Input:
ULID generated at 2026-11-25T00:00:00.000Z - Result:
01M8801200 + 16 random characters - Time part computed with the tool's Crockford Base32 encoding of 1795564800000 ms. Random tail omitted.
- Input:
ObjectID generated at 2026-11-25T00:00:00Z - Result:
6b062500 + 10 session hex chars + 6 counter hex chars - First 8 hex characters are the Unix seconds 1795564800 in hex, as the tool writes them.
- Input:
KSUID generated at 2026-11-25T00:00:00Z - Result:
Timestamp field = 395564800 - Unix seconds minus the KSUID epoch 1400000000. The 27-character base62 string also includes 16 random bytes.
- Input:
Snowflake generated at 2026-11-25T00:00:00.000Z - Result:
Between 1574937663897600000 and 1574937663901794303 - Milliseconds since 2015-01-01 shifted left 22 bits. Worker, process and sequence fill the low 22 bits.
- Input:
NanoID, Quantity 1 - Result:
21 characters from 0-9, A-Z, a-z, _ and - - Values are random, so only the shape is shown.
04Common use cases
- Deciding between ULID and UUID-style random keys for a Postgres primary key before writing the first migration
- Showing a junior developer which characters of an ObjectID hold the creation second
- Grabbing 100 NanoIDs as fixture values for a test suite that needs URL-safe slugs
- Checking how long a KSUID or Snowflake will be so you can size a VARCHAR or BIGINT column
- Explaining in a design review why time-ordered IDs leak the record's creation time
- Pasting a sample of every format into an architecture doc using the Format Comparison table
05Tips
- Store Snowflake IDs as strings in JSON. They exceed JavaScript's safe integer range of 2^53, so JSON.parse can round them.
- A ULID's first 10 characters are pure time, so you can range-scan a ULID index by date without a separate created_at column.
- Real Snowflake setups need a unique worker and process ID per generator. The random values on this page are for looking, not for production.
- The ObjectID middle bytes stay the same until you reload, which is exactly how one MongoDB process behaves. Reload to see them change.
- For genuine CUID2 values use the @paralleldrive/cuid2 package. Strings from this page only share its shape.
06Related concepts
CUID2, NanoID, ULID, Snowflake ID.
Frequently Asked Questions
What is ID Generator?
ID Generator is a free, browser-based developer tool on AIDToolStack. Generate CUID2, NanoID, ULID, ObjectID, Snowflake, and KSUID identifiers. It requires no installation or sign-up and works entirely in your browser.
Is ID Generator free to use?
Yes. No sign-up, no fees and no usage cap.
Does ID Generator store my data?
No. It runs in your browser; nothing is uploaded.