UUID generator

Generate and inspect cryptographically secure UUIDv4 and time-ordered UUIDv7 identifiers with zero latency. Features Reverse UUID Inspector, embedded UTC timestamp extraction, Stripe-style formatting, and zero-collision bulk generation.

Online Tools
SYS: ONLINE
CSPRNG (window.crypto)0ms Client-Side LatencyRFC 9562 / RFC 4122 Compliance
Select Identifier Architecture
Generated Cryptographic Identifier
Cryptographic Entropy:74 bits CSPRNG + 48 bits Millisecond Timestamp
018f3a5b-9d48-7e30-b98a-5e4d21f879ab

Advanced Formatting (Stripe-Style)

Apply typed domain prefixes, strip delimiters, and wrap identifiers for production schemas and ORM entities.

Hexadecimal Letter Case
Hyphen Delimiters
Prefix Presets:
Formatted Output Preview40 chars
usr_018f3a5b-9d48-7e30-b98a-5e4d21f879ab

One-Click Developer Snippets

Zero-dependency snippets to instantiate this exact UUID architecture in your target runtime.

// RFC 9562 UUIDv7 in JavaScript / TypeScript (Native Web Crypto)
export function generateUUIDv7(): string {
  const time = Date.now();
  const timeHex = time.toString(16).padStart(12, '0');
  const rand = new Uint8Array(10);
  window.crypto.getRandomValues(rand);
  rand[0] = (rand[0] & 0x0f) | 0x70; // Version 7
  rand[2] = (rand[2] & 0x3f) | 0x80; // Variant RFC 4122
  const randHex = Array.from(rand).map(b => b.toString(16).padStart(2, '0')).join('');
  return `${timeHex.slice(0,8)}-${timeHex.slice(8,12)}-${randHex.slice(0,4)}-${randHex.slice(4,8)}-${randHex.slice(8,20)}`;
}

RFC 9562 & RFC 4122 Standards Specifications

Authoritative engineering specifications for modern 128-bit Universally Unique Identifiers.

Evolution from RFC 4122 (2005) to RFC 9562 (May 2024)

Published by the IETF in May 2024, RFC 9562 obsoletes RFC 4122 to address critical scaling limitations in modern distributed databases. While RFC 4122 defined UUIDv1 (timestamp + MAC address) and UUIDv4 (pure random), modern cloud architectures required identifiers combining decentralized generation with database-friendly sequential locality. RFC 9562 formalizes UUIDv6 (reordered v1), UUIDv7 (Unix epoch time + random), and UUIDv8 (custom vendor layouts).

Cryptographic Entropy & Collision Mathematics

Rigorous probability calculations using the Birthday Paradox in 128-bit identifier spaces.

For an identifier space of N states and k generated identifiers, the collision probability is calculated by:

P(k) ≈ 1 - exp( -k² / (2 × 2¹²²) )
Identifiers GeneratedCollision Probability
1,000,000 (10⁶)
Instantaneous batch generation
≈ 1 × 10⁻²⁵ (Virtually 0)
1,000,000,000 (10⁹)
1B records in cloud database
≈ 1 × 10⁻¹⁹
100,000,000,000 (10¹¹)
Global telecommunication cluster scale
≈ 1 × 10⁻¹⁵
2.71 × 10¹⁸
Generating 1B IDs/sec for 85 consecutive years
≈ 0.0000001% (1 in a billion)

Production Database Integration Guide

Optimal DDL schema configurations for PostgreSQL, MySQL InnoDB, and SQLite.

PostgreSQL (v16 / v17+)
-- Recommended Schema for High-Throughput Tables
CREATE TABLE app_events (
    id UUID PRIMARY KEY, -- Stores 16 bytes binary
    payload JSONB NOT NULL,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

-- Extract timestamp directly from UUIDv7
-- No extra created_at index required!
SELECT id, ('x' || lpad(substr(replace(id::text, '-', ''), 1, 12), 16, '0'))::bit(64)::bigint
AS epoch_ms FROM app_events;
MySQL (InnoDB Engine)
-- Use BINARY(16) for Compact Primary Key
CREATE TABLE production_orders (
    id BINARY(16) PRIMARY KEY,
    amount DECIMAL(10,2) NOT NULL,
    status VARCHAR(32) NOT NULL
) ENGINE=InnoDB;

-- Insert UUIDv7 converted to binary
INSERT INTO production_orders (id, amount, status)
VALUES (UUID_TO_BIN('018f3a5b-9d48-7e30-b98a-5e4d21f879ab', 1), 99.50, 'paid');

How to Use the Cryptographic UUID Generator

Step-by-step developer guide to generating, inspecting, formatting, and database-optimizing 128-bit identifiers.

01

Select Identifier Architecture

Choose between UUIDv7 (time-ordered monotonic for primary keys and database indexing) or UUIDv4 (pure cryptographic randomness for session tokens and secrets).

02

Generate Cryptographic Identifiers

Click Regenerate to create a 128-bit identifier via the native Web Crypto API (window.crypto), guaranteeing sub-millisecond execution and zero-collision entropy.

03

Apply Stripe-Style Formatting

Add domain entity prefixes (e.g., usr_, tx_), toggle between lowercase and uppercase, remove hyphens (32-hex compact), or wrap in SQL, GUID, and Base64URL formats.

04

Inspect & Decode with Reverse Inspector

Switch to the Reverse UUID Inspector tab and paste any string to decode its RFC version, variant, bit layout, and extract the exact embedded UTC creation timestamp.

05

Generate Zero-Collision Batches

Use the Bulk Batch Grid tab to generate up to 50,000 cryptographically secure UUIDs in under 50ms, with one-click CSV, JSON, and plain-text export options.

06

Optimize Database Indexing & Schemas

Review the Database Optimizer tab to benchmark B-Tree page splits and copy ready-to-run DDL schemas for PostgreSQL (UUID), MySQL InnoDB (BINARY(16)), and SQLite.

Frequently Asked Questions (FAQ)

Authoritative answers to common questions about UUIDv7 vs UUIDv4 architecture, RFC standards, and indexing performance.

Q:Why does UUIDv7 prevent B-Tree index fragmentation compared to UUIDv4?

UUIDv4 distributes inserts completely at random across all B-Tree leaf pages. When an index leaf page exceeds capacity, the database engine executes an expensive page split, cutting page density to ~50% and thrashing the buffer cache. UUIDv7 embeds a 48-bit Unix millisecond timestamp at the beginning of the identifier, ensuring that consecutive records append monotonically to the rightmost leaf page with 90%+ fill factor and near-zero page splits.

Q:How does this UUID generator guarantee zero collisions and cryptographic security?

All generation logic executes entirely in your browser using the native Web Crypto API (window.crypto.getRandomValues and window.crypto.randomUUID). Unlike vulnerable PRNGs like Math.random(), Web Crypto draws high-entropy cryptographic seeds directly from the operating system kernel CSPRNG, making duplicates mathematically negligible.

Q:How does the Reverse UUID Inspector extract timestamps from UUIDv7 and UUIDv1?

In UUIDv7 (RFC 9562), the first 48 bits (12 hexadecimal characters) directly encode the Unix epoch timestamp in milliseconds. Our decoder isolates these 12 nibbles, parses them as a 48-bit integer, and converts them to exact ISO-8601 UTC time. In UUIDv1 (RFC 4122), the 60-bit timestamp counting 100-nanosecond intervals since October 15, 1582 is reconstructed from time_hi, time_mid, and time_low fields.

Q:Is UUIDv7 officially standardized by the IETF?

Yes. UUIDv7 was formally approved and published by the Internet Engineering Task Force (IETF) in May 2024 as RFC 9562, officially replacing and extending the legacy RFC 4122 specification.

Q:Can UUIDv7 leak sensitive user or infrastructure data?

No. Unlike legacy UUIDv1 which embeds the host physical MAC address (exposing network card identity), UUIDv7 contains only a public UTC timestamp and 74 bits of cryptographically uniform random entropy. No hardware or network data is leaked.

Q:What is the recommended column data type for storing UUIDv7 in PostgreSQL and MySQL?

In PostgreSQL, store UUIDv7 natively in the 16-byte UUID data type. In MySQL InnoDB, store it as BINARY(16) with an expression index, or use uuid_to_bin() to avoid 36-byte VARCHAR storage overhead.

Q:Can I sort database records by creation time using UUIDv7 primary keys?

Yes. Because the leading 48 bits represent the millisecond creation timestamp in big-endian order, standard lexicographical or binary sorting on the UUIDv7 column will automatically order records chronologically without requiring an extra created_at index.

Q:Why should I use Stripe-style prefixes (e.g., usr_, tx_) on UUIDs?

Stripe popularized typed entity prefixes for public APIs. Prefixes make IDs immediately human-readable in logs, eliminate parameter mismatch bugs in API handlers, and prevent cross-entity injection without sacrificing the collision-resistance of the underlying UUID.

What is UUID generator?

If you’ve ever scaled a distributed system, you already know that traditional auto-incrementing database integers are a massive bottleneck. They reveal your business metrics to competitors and cause absolute chaos when merging tables. This client-side engine is built to solve that exact headache. It lets you generate cryptographically secure UUIDv4 and time-ordered UUIDv7 tokens instantly, right in your browser. Because everything happens locally, your production keys and database schemas are never exposed to external servers. It’s a complete toolkit designed to help you format, inspect, and bulk-generate identifiers without breaking your workflow.

Real-World Scenario: Distributed Tracing in Microservices

Imagine a backend engineer working on a complex e-commerce platform built with microservices. They use Datadog to monitor traffic, but tracing a single user’s checkout journey across five different APIs is a nightmare because logs are arriving out of order. Instead of completely rewriting their logging middleware, the engineer switches their correlation IDs to UUIDv7. Using this generator, they create the new time-ordered identifiers to test their webhook payloads. Thanks to the embedded UTC timestamp in UUIDv7, the logging system naturally sorts the events chronologically, making distributed tracing incredibly fast and intuitive.

Core Technical Features

ToolEngineering PurposeDaily Workflow Benefit
UUIDv7 GeneratorCombines 48-bit Unix timestamps with random entropy.Keeps database records sequentially sortable, dramatically improving read performance.
Reverse InspectorParses existing UUIDv7 tokens to extract metadata.Allows developers to find the exact creation date of a record without querying the database.
Stripe-Style FormatterWraps raw IDs with semantic prefixes (e.g., inv_, usr_).Makes API responses infinitely easier for frontend teams to read and debug.
Native SnippetsGenerates zero-dependency code for major languages.Saves you from having to import bulky third-party NPM packages just to generate an ID.

History and Origin

The Universally Unique Identifier was born in the 1980s alongside the Apollo Network Computing System. Back then, getting multiple computers on a network to generate unique IDs without a central coordinator was a major computer science problem. Early versions (UUIDv1) used the computer's MAC address, which unfortunately leaked sensitive hardware information. To fix this privacy flaw, the industry moved to UUIDv4, which relies entirely on cryptographic randomness. Today, we are seeing the mass adoption of UUIDv7 (RFC 9562), a brilliant evolution that brings back chronological sorting while maintaining the bulletproof privacy of modern cryptography.