Skip to content
Docs navigationBrowse tools →

Tool docs

Identity Lab

A guide to generating and decoding ULID, KSUID, CUID2, Snowflake, ObjectId, and namespace-derived UUID v3/v5, and to choosing the right identifier format for a given use case.

Tool

Overview

01

Identity Lab

Identity Lab generates the structured identifier formats that UUID v4 and NanoID intentionally leave out: time-ordered ids (ULID, KSUID, UUID v7, Snowflake, ObjectId), deterministic namespace-derived ids (UUID v3/v5), and enumeration-resistant ids (CUID2). The Decode tab reverses the process — paste any supported id back in and it extracts the embedded timestamp, worker id, or other fields. The Compare tab lays every format's sortability, length, embedded time, database-index friendliness, URL safety, and privacy risk side by side.

Guide

Common usage patterns

01

Generating, decoding, and comparing identifiers

  • Pick a format on the Generate tab; UUID v3/v5 need a name and namespace, Snowflake needs a layout preset (Twitter, Discord, Instagram, or Sonyflake) plus a worker id.
  • Every generated id is decoded inline where the format supports it, so you can see exactly what a timestamp-bearing id reveals.
  • Use the Decode tab to paste an id from anywhere — a database row, a log line, an API response — and auto-detect its format.
  • Use the Compare tab before committing to a format: time-ordered ids are database-index friendly but leak creation time, while CUID2 and UUID v4 hide it at the cost of random-order inserts.

Guide

Edge cases & common pitfalls

01

What each format actually reveals

  • ULID, KSUID, UUID v7, Snowflake, and ObjectId all embed a recoverable creation timestamp — do not use them for values that must stay unguessable or that shouldn't reveal issuance rate.
  • Snowflake also embeds the generating worker or datacenter id in plain sight, which can leak infrastructure topology if ids are exposed publicly.
  • UUID v3 and v5 are deterministic: the same name and namespace always produce the same id, so anyone who can guess the name can confirm it by recomputing the id. Prefer v5 (SHA-1) over v3 (MD5) for new uses.
  • CUID2 deliberately hides its timestamp and counter — it cannot be decoded by design, which is what makes it a good choice for ids you don't want to be enumerable.

Internals

How it works internally

01

How generation and decoding work

Every generator runs locally with Web Crypto — nothing is sent anywhere. UUID v3/v5 hash the namespace and name with MD5/SHA-1 per RFC 4122; ULID and KSUID pack a big-endian timestamp into the leading characters of a Base32/Base62 string; Snowflake and ObjectId pack timestamp, worker/process, and sequence/counter fields into fixed bit or byte ranges. The Decode tab tries each format's structural signature (fixed length plus alphabet) from most to least specific and unpacks the matching fields.