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.

Updated
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, and the rest is random apart from the version and variant bits. UUIDs made in the same batch 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 generated one after another sort in the order they were created.

    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.

    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.

    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?

    v4 is fully random and suits most uses. v7 starts with a timestamp, so values sort by creation time, which works better as a database primary key.

    Can two UUIDs be the same?

    In theory yes, but with 122 random bits in v4 the chance is so small that it can be ignored in practice.

    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 the UUID Generator.