Generate CUID

Generate a compact Cuid-style identifier for client or server records.

freeworks offlinenothing uploaded
ToolCUID Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A Cuid starts with c and combines a millisecond timestamp, counter, fingerprint, and random block encoded in base36. These fields reduce collisions during rapid calls and across processes.

  • The prefix and base36 alphabet work in HTML and URLs.
  • The counter separates calls made in the same millisecond.

Worked example

Single CUID
Generate one collision-resistant CUID
Input
											1
										
Output
												cmt8nqxba0000lwkhpod76fhf
											

When to use this

Offline-first records, comments, and temporary client IDs generate Cuids.

Edge cases

  • The finite counter wraps and relies on fresh randomness.
  • Collision resistance is not a database uniqueness guarantee.
  • Timestamp ordering is approximate rather than globally strict.

References