deftools.io Developer Tools

🔢 Multi-Format ID Generator

Generate NanoID, ULID, CUID2, KSUID, and UUID v4/v7 identifiers. Decode Snowflake IDs from Twitter/X and Discord back to timestamps and metadata. The go-to tool when you need IDs beyond plain UUIDs.

About this tool

This tool generates several types of unique identifiers for distributed systems, microservices, databases, and cache keys. CUID2 (collision-resistant, prefixed with ck) is designed for horizontally scaled apps where collision probability must stay near zero even across independent instances. KSUID embeds a second-precision timestamp in a base62-encoded 27-character string, letting you extract the creation time later. ULID packs a millisecond timestamp + randomness into 26 URL-safe characters. NanoID is a short, configurable-length alternative with a URL-safe alphabet. UUID v4 (random) and v7 (time-sortable) round out the set for projects that need the standard UUID format.

Example: generate 5 ULIDs and you get time-sortable strings like 01JQ7X8K5R3VGZQJ8YQWJF0P2H that encode the current millisecond — perfect for primary keys in PostgreSQL or MongoDB. Switch to the Snowflake mode, paste a Twitter tweet ID like 1593770706594447360, and the tool decodes it back to the exact second it was posted (July 2022), the worker ID, and the sequence number.

For a tool focused on UUID generation (v4, v7, GUIDs) with ID inspection, see the UUID Generator & Inspector.

FAQ

What's the difference between ULID and UUID?

ULID is a 26-character, lexicographically sortable, URL-safe identifier that encodes a Unix timestamp (milliseconds) in the first 10 characters. UUID v4 is 36 characters, purely random, and not sortable. ULID is smaller and time-ordered, making it better for database indexes.

Are these IDs cryptographically secure?

NanoID, CUID2, UUID v4, and UUID v7 use <code>crypto.getRandomValues()</code> for randomness, which is cryptographically secure. ULID uses <code>Date.now()</code> for its timestamp portion (predictable) but random bytes for the remaining portion. Snowflake decoding doesn't involve randomness.

What is a Snowflake ID?

A Snowflake ID is a 64-bit unique identifier scheme created by Twitter (now X). It encodes a timestamp in milliseconds, a worker ID, and a sequence number. IDs like 1593770706594447360 are Twitter tweet IDs. Discord and other systems use variants. This tool decodes them back into human-readable timestamps.

Can I generate IDs offline?

Yes — everything runs in your browser using <code>crypto.getRandomValues()</code>. No server requests are made, so it works offline. The only exception is ULID which uses <code>Date.now()</code>, also purely local.

More developer tools

Copied!