100% Client-Side Web Cryptography (CSPRNG) • RFC 9562 & 4122 Compliant

UUID Generator – Generate UUID v4 & v7 Online

Generate secure UUID v4 and UUID v7 identifiers online. Create single or bulk UUIDs, customize formatting, validate UUIDs, inspect UUID structure, and download results as TXT, JSON, CSV, or SQL.

Executive Summary: Online UUID v4 & v7 Generator

Direct Answer

What is a UUID Generator? A UUID Generator is a developer utility that produces 128-bit Universally Unique Identifiers formatted into 32 hexadecimal digits and four hyphens (8-4-4-4-12). It supports both purely random UUID v4 (RFC 4122) and modern time-ordered UUID v7 (RFC 9562) with zero server latency or data tracking.

Target Audience Backend engineers, database architects, SREs, API designers, and distributed systems developers.
Core Capabilities UUID v4 (random), UUID v7 (time-ordered), bulk generator (1 to 1,000), validator & decoder with timestamp extraction.
Privacy Protocol 100% client-side browser execution via Web Cryptography CSPRNG; generated IDs are never stored or logged.
Standard Compliance Full adherence to IETF RFC 9562, RFC 4122, and ISO/IEC 9834-8.
Version 4 provides 122 bits of random data, making accidental collisions extraordinarily unlikely when generated correctly.
1 UUID•36 chars•RFC 4122 v4
Generated locally in < 0.5ms

UUID Validator & Decoder Inspector

Validate UUID syntax, identify version and variant, extract embedded timestamps (for v7, v1, v6), and view segment structures.

UUID
Validation Status: Valid UUID
RFC 9562 / RFC 4122 Standard
UUID Version
Version 4 (Random)
Generated using cryptographically secure pseudorandom numbers.
Extracted Timestamp
—
Available on time-ordered UUIDs (v7, v1, v6).
Variant
RFC 4122 / RFC 9562
Leach-Salz standard (bits 10xx)
Clean Hexadecimal (32 chars)
—
Decimal (128-bit BigInt)
—
URN Representation
—
128-Bit Structure & Segment Breakdown
Field NameBit RangeHex ValuePurpose & Description
time_low / unix_ts_ms32 bits (0–31)—High 32 bits of Unix millisecond timestamp (v7) or low timestamp (v1)
time_mid / ts_low16 bits (32–47)—Low 16 bits of Unix millisecond timestamp (v7) or middle timestamp (v1)
time_hi_and_version16 bits (48–63)—4-bit version indicator nibble followed by 12 random/sub-ms bits
clock_seq_and_variant16 bits (64–79)—2-bit variant indicator (10xx) and 14 random sequence bits
node / rand_b48 bits (80–127)—Final 48 bits of cryptographic entropy (v4/v7) or MAC node ID (v1)

Generate UUIDs in Modern Programming Languages

Code examples for UUID v4 (random) and UUID v7 (time-ordered) across popular backend frameworks.

// Native JavaScript / Node.js (Web Crypto API)
const uuidV4 = crypto.randomUUID(); // Native Version 4 UUID
console.log(uuidV4); // e.g. "550e8400-e29b-41d4-a716-446655440000"

// Using npm 'uuid' package for UUID v7 (RFC 9562)
// npm install uuid
import { v4 as uuidv4, v7 as uuidv7 } from 'uuid';

const randomId = uuidv4();
const timeOrderedId = uuidv7(); // Automatically ordered by timestamp

What is a UUID and How Does It Work?

Direct Answer: A UUID (Universally Unique Identifier)—standardized under IETF RFC 9562 and RFC 4122—is a 128-bit mathematical identifier designed to enable distributed computing systems to generate globally unique IDs without central database coordination.

A UUID is represented as 32 hexadecimal characters divided by four hyphens into five distinct groups: 8-4-4-4-12 (e.g. 550e8400-e29b-41d4-a716-446655440000). In this canonical representation, the 13th character specifies the UUID Version (e.g., 4 for random, 7 for time-ordered), and the 17th character indicates the RFC Variant (8, 9, a, or b).

UUID Versions Explained: Complete Comparison of v1, v2, v3, v4, v5, v6, v7, and v8

Direct Answer: Standardized across IETF RFC 9562 (which superseded RFC 4122 in 2024), UUIDs are divided into eight official numbered versions plus Nil and Max sentinels, each designed for specific architectural requirements:

VersionType / MechanismTimestampSortablePrimary Use Case & Status
UUID v1Time + MAC node address✅ Yes❌ NoLegacy: 100ns Gregorian intervals + MAC address. Deprecated due to hardware privacy leakage.
UUID v2DCE Security (POSIX UID/GID)✅ Yes❌ NoLegacy: Embeds local POSIX user/group IDs. Rarely used due to 7-minute domain collision limits.
UUID v3MD5 namespace hash❌ No❌ NoDeterministic: MD5-based name hashing. Superseded by v5 due to cryptographic weaknesses in MD5.
UUID v4Cryptographic random (CSPRNG)❌ No❌ NoGeneral Purpose: Universal standard for security tokens, session keys, and unpredictable entity IDs.
UUID v5SHA-1 namespace hash❌ No❌ NoDeterministic: Recommended standard for reproducible IDs generated from URLs, domain names, or strings.
UUID v6Reordered Gregorian time + random✅ Yes✅ YesSortable Legacy: Reorders v1 timestamp fields into big-endian order for improved database B-Tree index locality.
UUID v7Unix milliseconds + random✅ Yes✅ YesModern Systems: Recommended modern standard (RFC 9562) for database primary keys and event streaming.
UUID v8Custom / vendor payloadDependsDependsCustom Applications: Reserved for proprietary, experimental, or domain-specific 128-bit identifier layouts.
Nil / MaxAll zeros (Nil) or all ones (Max)❌ No—Sentinel Limits: Used as unassigned default foreign keys (Nil) or theoretical maximum search limits (Max).
UUID v1 & v2Legacy

v1 uses 100ns Gregorian intervals + MAC address, creating privacy concerns. v2 embeds POSIX UIDs for DCE security domains. Both are superseded in modern cloud architectures.

UUID v3 & v5Deterministic

Deterministic name-based identifiers. Given the same namespace and string, they always output identical bytes. v5 (SHA-1) is strongly recommended over v3 (MD5).

UUID v4Universal

Generates 122 cryptographically secure random bits. Ideal when total unpredictability and privacy are needed without revealing generation timestamps.

UUID v6, v7 & v8RFC 9562

RFC 9562 standard. v6 reorders v1 fields; v7 utilizes 48-bit Unix epoch ms for optimal DB index clustering; v8 allows vendor-defined custom 128-bit payload structures.

UUID v4 vs. UUID v7: Which Should You Use?

Direct Answer: Use UUID v4 when complete randomness is required and you do not want to leak generation times (e.g. security tokens, password resets, public correlation IDs). Use UUID v7 for database primary keys and event logs where time-based sorting and B-Tree index performance are essential.

UUID v4 (Random)

  • Pure Randomness: 122 bits of CSPRNG entropy.
  • Privacy: Zero timestamp or sequence information exposed.
  • Database Impact: Causes random page splits in B-Tree indices when used as auto-indexing primary keys.

UUID v7 (Time-Ordered)

  • Chronological Sorting: Starts with Unix millisecond timestamp.
  • Database Locality: Sequential inserts append cleanly to B-Tree leaf pages without fragmentation.
  • Timestamp Extractable: Easily inspect creation time using our Unix Timestamp Converter.

UUID vs. GUID, ULID, Snowflake ID & NanoID

Direct Answer: While UUIDs and GUIDs are 128-bit hexadecimal identifiers, modern alternatives like ULID, Snowflake IDs, and NanoID offer different tradeoffs in length, base encoding, and URL friendliness:

Identifier TypeBit SizeString LengthSortableEncodingIdeal Workflow
UUID v4 / GUID128 bits36 charsNoHexadecimalUniversal standard, public APIs, session tokens.
UUID v7128 bits36 charsYesHexadecimalModern relational & NoSQL primary keys.
ULID128 bits26 charsYesCrockford's Base32Compact, case-insensitive, URL-safe identifiers.
Snowflake ID64 bits19 charsYesDecimal int64High-scale distributed systems (Twitter, Discord).
NanoIDVariable21 charsNoCustom Base64Short, compact URL-safe keys in web applications.

Using UUIDs as Database Primary Keys: PostgreSQL, MySQL & SQL Server

Direct Answer: When using UUIDs as primary keys, store them in native binary formats (such as PostgreSQL's UUID type or MySQL's BINARY(16)) rather than text strings (CHAR(36)) to cut storage overhead by 55% and improve index cache utilization.

PostgreSQL

Native 16-byte UUID data type with indexing support:

CREATE TABLE users (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid()
);
MySQL / MariaDB

Use BINARY(16) with UUID_TO_BIN() for compact storage:

CREATE TABLE users (
  id BINARY(16) PRIMARY KEY,
  name VARCHAR(100)
);
SQL Server

Use native uniqueidentifier with sequential IDs:

CREATE TABLE Users (
  Id UNIQUEIDENTIFIER DEFAULT NEWSEQUENTIALID() PRIMARY KEY
);

100% Client-Side Privacy & Cryptographic Security

Direct Answer: OperateTools UUID Generator executes 100% inside your web browser's local sandbox using the W3C Web Cryptography API (crypto.getRandomValues). Your generated UUIDs, seed data, and decoded payloads are never sent to external servers or logged in any database.

Collision Probability Analysis: Version 4 provides 122 bits of random data (2122 or 5.3 × 1036 possible combinations), making accidental collisions extraordinarily unlikely when generated correctly. According to the Birthday Paradox, generating 1 billion UUIDs every second for approximately 85 continuous years yields roughly a 50% probability of a single duplicate.

Frequently Asked Questions

Answers to common questions about UUID v4 vs v7, generation standards, collision rates, and database primary keys.

What is the difference between UUID v4 and UUID v7?

Direct Answer:

UUID v4 is entirely pseudo-random (122 random bits), providing maximum entropy but resulting in random B-Tree index insertion in databases. UUID v7 (RFC 9562) begins with a 48-bit Unix millisecond timestamp followed by 74 random bits, creating time-ordered sortable identifiers that optimize database clustering, index locality, and write performance.

What is the difference between a UUID and a GUID?

Direct Answer:

UUID (Universally Unique Identifier) and GUID (Globally Unique Identifier) refer to the exact same 128-bit mathematical identifier standard (RFC 9562 / RFC 4122). "GUID" is the terminology historically established by Microsoft and the .NET ecosystem, while "UUID" is the universal Unix, Linux, and IETF standard terminology.

How can I extract the creation timestamp from a UUID v7?

Direct Answer:

In UUID v7, the first 48 bits (the first 12 hexadecimal characters, spanning the first 8-character and 4-character blocks) store a big-endian Unix epoch timestamp in milliseconds. By taking these 12 hex digits and converting them to a decimal integer, you obtain the exact Unix timestamp in milliseconds when the UUID was generated.

Are UUIDs generated on this website secure and private?

Direct Answer:

Yes, 100%. All UUIDs are generated directly inside your web browser using the native Web Cryptography API (crypto.getRandomValues and crypto.randomUUID). No generated UUIDs, IP addresses, or payloads are ever sent to or stored on any server.

What are the chances of a UUID v4 collision?

Direct Answer:

The collision probability of UUID v4 is extraordinarily low. Version 4 provides 122 bits of random data (2^122 or 5.3 x 10^36 possible combinations), making accidental collisions extraordinarily unlikely when generated correctly. You would need to generate 1 billion UUIDs per second for approximately 85 years to reach a 50% probability of generating a single duplicate.

What are Nil and Max UUIDs?

Direct Answer:

A Nil UUID (00000000-0000-0000-0000-000000000000) is a special-case UUID with all 128 bits set to zero, commonly used as a default placeholder or unassigned foreign key. A Max UUID (ffffffff-ffff-ffff-ffff-ffffffffffff) has all 128 bits set to one, defined in RFC 9562 as the theoretical maximum identifier.