UUID Generator

Generate unique identifiers (UUID v1, v4, v7) with customizable formatting

UUID v4: Random (cryptographically strong)
Click Generate to create UUIDs

UUID Generator — Generate RFC 4122 UUIDs Online

Understanding the Basics

A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier) in Microsoft contexts, is a 128-bit identifier standardized in RFC 4122 that is designed to be unique across all space and time without requiring a central authority to coordinate assignments. UUIDs are formatted as 32 hexadecimal digits separated by hyphens in the pattern 8-4-4-4-12 (e.g., 550e8400-e29b-41d4-a716-446655440000). Different UUID versions use different sources of uniqueness: Version 1 (time-based) combines the current timestamp with the MAC address of the generating machine; Version 3 uses MD5 hashing of a namespace and name; Version 4 (the most widely used) generates 122 bits of cryptographic randomness; Version 5 uses SHA-1 hashing of a namespace and name; and the newer Version 7 uses a Unix timestamp prefix for sortable UUIDs. UUIDs are used as primary keys in distributed databases (where auto-increment integers would collide across shards), event IDs in message queues, session tokens, correlation IDs in distributed tracing, and filenames for uploaded assets. The probability of generating a duplicate UUID v4 is astronomically small: colliding with an existing UUID among a billion generated UUIDs has a probability of roughly 1 in 10^18.

How to Use the Tool

  1. Select the UUID version: v4 (random, most common), v1 (time-based with MAC), or v5 (name-based SHA-1).
  2. For v5, enter the namespace (e.g., URL or DNS namespace UUID) and the name string.
  3. Click "Generate" (or "Generate Batch" to create multiple UUIDs at once).
  4. Each UUID is displayed in the standard 8-4-4-4-12 hyphenated hex format.
  5. Copy individual UUIDs or the entire batch to clipboard for use as database primary keys, API identifiers, or session tokens.

Key Features & Specifications

  • Generates UUID v4 (cryptographically random), v1 (timestamp + machine-based), and v5 (SHA-1 namespace-based)
  • Batch generation: create 1 to 1000 UUIDs in a single click
  • Format options: standard hyphenated, no-hyphen, uppercase, and lowercase
  • UUID v5 mode accepts standard namespaces: URL, DNS, OID, X.500
  • Copy all generated UUIDs as a newline-separated list or JSON array

Frequently Asked Questions (FAQ)

Q:Why is UUID v4 preferred over UUID v1 for most use cases?
UUID v1 embeds your machine's MAC address and the current timestamp, potentially leaking information about when and where the UUID was generated. UUID v4 uses cryptographic randomness with no embedded metadata, making it safer for use as publicly visible identifiers.
Q:Are two UUID v4 values ever guaranteed to be different?
Not mathematically guaranteed, but practically certain. With 122 bits of randomness, the probability of two UUIDs colliding is 1 in 2^122 ≈ 5×10^36. Generating a billion UUIDs per second for a trillion years would have an infinitesimally small collision probability.
Q:What is UUID v7 and why is it gaining popularity?
UUID v7 (finalized in RFC 9562, 2024) includes a 48-bit Unix millisecond timestamp prefix followed by random bits. This makes UUID v7 values sortable by creation time — unlike v4 UUIDs which are fully random and unsortable. Sortable UUIDs dramatically improve database index performance because new rows cluster at the end of B-tree indexes rather than fragmenting across the entire index.