Free tool

UUID v7, ULID & NanoID Generator

Generate cryptographically secure bulk UUID v7, UUID v4, ULID, and custom NanoID batches—or decode embedded Unix millisecond timestamps from any UUID v7 or ULID locally in your browser.

UUID v7, ULID & NanoID Generator: the tool

Web Crypto CSPRNG • 100% Client-Side

Identifier Settings

Identifier Standard
10 IDs
150100200
Export Format
Generated Output (5)
01950f4a-8c20-7a1b-8c3d-4e5f6a7b8c9d
01950f4a-8c21-7b2c-9d4e-5f6a7b8c9d0e
01950f4a-8c22-7c3d-ae5f-6a7b8c9d0e1f
01950f4a-8c23-7d4e-bf6a-7b8c9d0e1f2a
01950f4a-8c24-7e5f-8a7b-8c9d0e1f2a3b
RFC 9562 UUID v7: 48-bit Unix ms timestamp + 74-bit CSPRNG entropy.

Designing high-throughput databases or distributed APIs?

DEESU builds scalable PostgreSQL schemas, distributed backend services, and TypeScript APIs engineered for clean indexing and zero bottlenecks.

Talk to Our Engineers

How it works

Why UUID v7 Replaced UUID v4 for Modern SQL Databases

For over a decade, UUID v4 was the default distributed primary key for microservices because any node could generate a globally unique 128-bit identifier without coordinating with a central sequence. However, UUID v4 has a serious performance flaw in relational databases like PostgreSQL, MySQL (InnoDB), and SQLite: its bits are completely random.

Every time a database inserts a random UUID v4 into a B-Tree primary key index, it jumps to an arbitrary page in memory or on disk. Once your index outgrows available RAM, random inserts trigger excessive page splits, high write amplification, and severe cache thrashing. RFC 9562 solved this in 2024 by standardizing UUID v7, which places a 48-bit big-endian Unix millisecond timestamp in the most significant bits followed by 74 bits of cryptographic randomness. New records always append sequentially to the rightmost edge of the B-Tree index, restoring sequential insert throughput while retaining full 128-bit UUID compatibility.

Comparing UUID v7, UUID v4, ULID, and NanoID

Choosing the right identifier format depends on your database engine, URL aesthetics, privacy requirements, and compatibility with existing tooling. Each standard makes deliberate trade-offs between sortability, string compactness, and timestamp leakage:

  • UUID v7 (36 chars with hyphens, 128-bit): Best overall choice for PostgreSQL, Prisma, Drizzle, and distributed SQL primary keys. Time-ordered to the millisecond, natively stored in 16-byte uuid columns, and backed by RFC 9562.
  • ULID (26 chars, 128-bit): Uses Crockford Base32 (no hyphens, no ambiguous I/L/O/U characters) with a 48-bit millisecond timestamp and 80 bits of randomness. Great for URLs, DynamoDB/Firestore sort keys, and human-friendly copy-paste.
  • UUID v4 (36 chars, 128-bit): Contains 122 bits of pure randomness and zero timestamp information. Ideal for session tokens, password reset identifiers, or public resources where revealing creation time is undesirable.
  • NanoID (default 21 chars, customizable): Uses a 64-character URL-safe alphabet (A-Za-z0-9_-) to achieve collision resistance comparable to UUID v4 in 40% fewer characters. Perfect for short links, invite codes, and client-facing slugs.

Prefixing Public IDs (Stripe-Style Identifiers)

Many modern APIs—popularized by Stripe—prepend a short, lowercase domain prefix to every public identifier, such as usr_01950f4a..., ord_01JMC..., or tok_V1StGXR8.... Prefixing prevents costly developer mistakes where a customer ID is accidentally passed into an invoice endpoint, makes production logs immediately self-documenting, and enables automated secret scanners to detect leaked API keys.

If your database uses native 16-byte uuid columns in PostgreSQL, you can store the raw UUID v7 internally for optimal index performance and attach or strip the domain prefix at your API serialization boundary.

Cryptographic Security and Client-Side Generation

All identifiers in this tool are generated locally inside your browser using the Web Crypto API (crypto.getRandomValues), backed by your operating system's CSPRNG (cryptographically secure pseudorandom number generator). Unlike Math.random(), which uses a predictable PRNG unsuitable for security-sensitive identifiers, Web Crypto provides uniform entropy with zero network calls—your generated IDs and inspected tokens never leave your device.

FAQ

Questions, answered

For PostgreSQL, UUID v7 is generally the stronger choice because PostgreSQL has a built-in 16-byte uuid column type with native indexing and RFC 9562 support (including native uuidv7() in PostgreSQL 18+). ULIDs are excellent when you store IDs as strings (e.g., DynamoDB, MongoDB, or URLs) and want shorter 26-character identifiers without hyphens.

Yes. Both UUID v7 and ULID encode a 48-bit Unix millisecond timestamp in their leading bits, meaning anyone with the ID can decode the exact millisecond it was generated. If creation time is sensitive (for example, concealing user signup velocity or generating secret reset links), use UUID v4 or a high-entropy NanoID instead.

A standard 21-character NanoID using the 64-character URL-safe alphabet delivers 126 bits of entropy—slightly more than UUID v4's 122 random bits. At a rate of 1,000 IDs per second, it would take millions of years to reach a 1% probability of a single collision.

Yes. Every ID is created locally via window.crypto.getRandomValues using unbiased bit-slicing (for ULID) and rejection sampling (for NanoID), strictly following RFC 9562 for UUID v7/v4 and the official ULID specification.

Yes! If you paste a Stripe-style prefixed ID like usr_01950f4a-8c20-7a1b-8c3d-4e5f6a7b8c9d or ord_01JMC7X8E2K4M9P1Q2R3S4T5V6, the Inspector automatically detects and strips the prefix, validates the underlying ID, and decodes the exact UTC and local timestamp.

More free tools

Reply within 1 business day

Tell us what you're building.

Send the problem, not a polished brief. We'll tell you what it actually takes to ship it: stack, timeline and cost, before you commit to anything.