UUID Generator (v4 & v7)

Generate random UUID v4 and time-ordered UUID v7 identifiers locally using native browser crypto primitives with bulk and case options.

Generated V4 Identifiers

0 UUIDs

ℹ️ Understanding UUID v4 vs. UUID v7 (RFC 9562)

UUID v4 (Random)

Generated purely from 122 bits of cryptographic pseudo-randomness. Completely non-sequential, with virtually zero collision probability (1 in 2¹²²).

Best for: Temporary tokens, session identifiers, and security nonces where chronological order must be kept hidden.

UUID v7 (Time-Ordered)

Combines a 48-bit Unix timestamp in milliseconds with 74 bits of entropy. Naturally sortable chronologically, avoiding database B-tree index fragmentation.

Best for: Database primary keys (PostgreSQL, MySQL), event streams, and distributed message tracking.

How It Works

  • Generates RFC 4122 random UUID v4 using native Web Crypto crypto.randomUUID().
  • Generates RFC 9562 UUID v7 embedding 48-bit millisecond unix timestamps for optimal database index clustering.
  • Supports bulk batch generation (up to 50 UUIDs) with uppercase/lowercase formatting.
Formula & Technical Standard
v4: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx | v7: [48-bit timestamp]-7xxx-[sub-ms]-xxxxxxxxxxxx

Practical Example

Batch UUIDs
Input: Generate 5 UUID v7
Output: 018e69d7-8461-7bf3-9cb3-9118e97f5f92...
Chronologically sortable identifiers.

Frequently Asked Questions

When should I use UUID v7 over v4?

UUID v7 is ideal for database primary keys because its chronological ordering prevents B-Tree index fragmentation while retaining global uniqueness.

Related Tools