Skip to main content

UUID Generator

Generate UUIDs v1, v4, or v7 for IDs, primary keys, or distributed systems.

Version 1: Timestamp-based, includes MAC address information

Version 4: Randomly generated, most commonly used

Version 7: Timestamp-based with random data, sortable by creation time

Generate Universally Unique Identifiers (UUIDs) in multiple versions including v1, v4, and v7. UUIDs are 128-bit identifiers that are unique across time and space, making them ideal for distributed systems, database primary keys, and unique resource identification. Our generator supports batch generation and multiple output formats.

What is UUID Generator?

A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. UUIDs are designed to be unique without requiring a central coordinating authority. Different UUID versions use different generation methods: v1 uses MAC address and timestamp, v4 uses random numbers, and v7 uses a timestamp-based approach that provides better database indexing performance.

Common Use Cases

  • Database primary keys - use UUIDs instead of auto-incrementing integers for distributed databases
  • API resource identification - create unique IDs for REST API resources
  • Distributed systems - generate unique identifiers without coordination
  • Session management - create unique session identifiers
  • File naming - generate unique filenames to avoid collisions
  • Event tracking - create unique event IDs for analytics

How It Works

UUIDs are 128-bit values typically displayed as 32 hexadecimal digits in five groups separated by hyphens (8-4-4-4-12 format). Version 1 UUIDs combine a MAC address with a timestamp. Version 4 UUIDs use random or pseudo-random numbers. Version 7 UUIDs use a Unix timestamp in milliseconds for the first 48 bits, providing time-ordered UUIDs that sort chronologically and improve database index performance.

Examples

UUID v4 (random)

Input:
Version: v4
Output:
550e8400-e29b-41d4-a716-446655440000

UUID v7 (time-ordered)

Input:
Version: v7
Output:
018e8f24-7c3a-7000-8000-000000000000

ThenCatch is a free developer toolkit. Learn more about us.