UUID Generator

How UUID Generation Works

UUIDs are generated using either random numbers (v4) or a combination of timestamp and random bits (v7).

  1. 1

    Choose version

    Select UUID v4 for fully random identifiers, or UUID v7 for timestamp-based, sortable identifiers.

  2. 2

    Generate random bytes

    16 random bytes are generated using the Web Crypto API (cryptographically secure).

  3. 3

    Set version and variant bits

    The version (4 or 7) and variant bits are set according to RFC 4122. For v7, the first 48 bits encode the timestamp.

  4. 4

    Format as UUID string

    The bytes are formatted as a standard UUID string (xxxxxxxx-xxxx-Vxxx-yxxx-xxxxxxxxxxxx).

FAQ

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier that is unique across space and time. Version 4 UUIDs are generated using random numbers, while version 7 UUIDs are timestamp-based.
What is the difference between UUID v4 and v7?
UUID v4 is fully random, while UUID v7 embeds a Unix timestamp in the first 48 bits, making it sortable by creation time. UUID v7 is useful for database indexes and distributed systems where ordering matters.
Are UUIDs unique?
Yes, the probability of generating duplicate UUIDs is astronomically low. For v4, the chance of collision is about 1 in 2.71Γ—10^18. UUIDs are safe to use as unique identifiers without coordination.
Can I generate UUIDs without hyphens?
Yes, toggle the "No hyphens" option to produce compact UUIDs like 550e8400e29b41d4a716446655440000 instead of the standard 550e8400-e29b-41d4-a716-446655440000 format.

Related Tools