UUID Generator

Generate random v4 UUIDs or time-ordered v7 UUIDs, from one to 1,000 at a time. The UUID generator uses your browser's secure random number generator.

Generated in your browser with a cryptographic random source.
Version

UUIDs

    How to use the UUID Generator

    1. Choose the Version: v4 for random IDs, or v7 for IDs that sort by creation time.
    2. Set the Count and the format options: Uppercase, Hyphens, and Wrap in braces.
    3. Press Generate. Copy one UUID, Copy all, or Download .txt.

    How it works

    A UUID is 128 bits written as 32 hexadecimal digits in five groups: 8-4-4-4-12.

    • v4: 122 random bits. The other 6 bits mark the version (the digit 4) and the variant (the first digit of the fourth group is 8, 9, a, or b).
    • v7: follows RFC 9562. The first 48 bits are the Unix time in milliseconds. This generator uses a 12-bit counter and 62 random bits after the timestamp, with the other 6 bits marking the version and variant. Values made within this generator are kept in increasing order.

    Randomness comes only from crypto.getRandomValues and crypto.randomUUID. Math.random is never used.

    Examples

    • v4 format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where y is 8, 9, a, or b.
    • v7 values made one after another within this generator sort in generation order; separate generators are not coordinated.

    Where UUIDs are used

    • Primary keys in databases, especially when records are created on several servers
    • Request and trace IDs in logs
    • File names that must not collide
    • Idempotency keys that stop a payment or order being processed twice

    Microsoft calls the same thing a GUID (globally unique identifier). GUIDs and UUIDs use the same 128-bit format, and many Windows tools display them in braces, which is what the "Wrap in braces" option is for.

    For a database key, compare UUID v4 and v7 for database IDs before choosing time ordering or an embedded creation timestamp. The guide distinguishes the tool's generator behavior from performance that needs testing in your own database.

    Limitations

    • The count is limited to 1 to 1,000. Values outside that range are clamped, with a note.
    • A v7 UUID reveals roughly when it was created, because the timestamp is part of it. Use v4 when that matters.
    • Only versions 4 and 7 are available.

    UUIDs identify records. They do not establish authorization, and a v7 timestamp can expose creation time. RFC 9562 describes the formats and security considerations.

    For a secret value rather than a record identifier, generate a random token with a length suited to your application.

    To generate values in a script, use the Python UUID examples and check which versions your interpreter supports.

    Read the guide

    Create a UUID in Python

    Run Python UUID examples, convert an ID to text or hex, save a small batch, and check whether your interpreter supports uuid7.

    Frequently asked questions

    What is a UUID?

    A 128-bit identifier written as 36 characters. It is designed to be unique without a central registry.

    Should I use v4 or v7?

    Choose v4 when you want random identifiers without an embedded creation time. v7 starts with a millisecond timestamp, which can help locality in a time-ordered database index, but exposes approximate creation time. The better primary key depends on the database, index and workload; benchmark your own case.

    Can two UUIDs be the same?

    Yes. Collisions are possible, although properly generated v4 UUIDs have a very large random space. Keep a unique constraint on database identifiers and handle a collision instead of treating uniqueness as guaranteed.

    Are these UUIDs generated securely?

    Yes. They come from your browser's cryptographic random number generator and never touch our server.

    Often used together with UUID Generator.

    • Random Token Generator

      Generates secure random tokens and API keys with a chosen length, alphabet, and prefix.