Random CUID Generator

Generate secure, collision-resistant ids optimized for horizontal scaling and performance.

Configuration

Single CUID

Click generate to start

Bulk Generation

Batch Mode

About CUID2 Generator

CUID2 is a modern identifier format built for horizontal scaling, security, and practical performance. The CUID2 design aims to be collision-resistant at scale and hard to guess, helping reduce risks like enumeration attacks when IDs are exposed publicly (e.g., in URLs).

Why developers pick CUID2

  • Designed for distributed generation: Multiple machines can create IDs without coordination.
  • URL- and name-friendly: Base36 output (lowercase letters + digits) with no special characters.
  • Configurable: You can tune output length, fingerprinting, and randomness sources for your environment.

JavaScript / TypeScript examples

Default generator:

import { createId } from "@paralleldrive/cuid2";
import { isCuid } from "@paralleldrive/cuid2";

const id: string = createId();
console.log(id, isCuid(id)); // true/false

Custom configuration (length / fingerprint / RNG):

import { init } from "@paralleldrive/cuid2";

const createShortId = init({
  length: 10,
  fingerprint: "my-service-node-1",
  random: Math.random, 
});

console.log(createShortId());

When CUID2 is a strong default

  • Public-facing identifiers where guessing IDs should be difficult
  • Multi-tenant systems where enumeration could leak data
  • Apps spanning browser + Node + containers that want consistent ID generation rules

Need a secure random number generator or random generator for apps? This CUID2 tool acts as a secure random object generator, leveraging entropy sources to create collision-resistant IDs. It's an upgrade over a simple google random number generator or generic random nr output for distributed systems.

Message sent successfully.