Toolsel

UUID Generator

Runs in your browser

Generate cryptographically random UUID v4 and time-sortable UUID v7 identifiers.

Format

122 random bits. Use when the identifier should reveal nothing at all.

0 UUIDs

    What is a UUID Generator?

    A UUID is a 128-bit identifier written as 36 characters — 32 hexadecimal digits in five hyphen-separated groups. Its purpose is to let independent systems mint identifiers that will not collide without coordinating with each other or with a central database.

    Version 4 is 122 random bits and is what most people mean by "a UUID". Version 7, standardised in RFC 9562, puts a millisecond timestamp in the leading 48 bits and fills the rest with randomness. That single change makes v7 values sort chronologically, which matters more than it sounds.

    The difference shows up in your database. B-tree indexes fill efficiently when new keys are appended at the end; random v4 keys instead scatter writes across the whole index, fragmenting pages and pushing hot data out of cache. v7 keys arrive in order, so inserts stay sequential. If you are choosing a primary key type today, v7 is usually the better default.

    How to use it

    1. Choose a version — v4 for pure randomness, v7 when the identifier will be a database key or needs to sort by creation time.
    2. Set how many you need. Generating a batch is useful for seed data and fixtures.
    3. Toggle uppercase, hyphens, or surrounding braces to match the format your target system expects.
    4. Copy a single value with the button beside it, or copy the whole list at once.

    Examples

    UUID v4 — random

    Input
    Version: v4, Count: 3
    Output
    9f8c2a41-7b3e-4d5a-9c16-2e8f0b4a7d31
    c4e91f07-5a2b-4e88-b0d3-6f1c9a84e250
    1d7b3e52-8c4f-4a91-9e26-0b5d3f8c1a47

    UUID v7 — time-sortable

    Input
    Version: v7, Count: 3
    Output
    0191f3a2-8c40-7b19-9e3d-4a7f2c6b8e05
    0191f3a2-8c41-7d62-a015-9b3e7f2d4c81
    0191f3a2-8c41-7e0a-8c47-1f6b9d3a5e72

    Frequently asked questions

    Are these UUIDs actually random?
    Yes. They come from crypto.getRandomValues(), your browser's cryptographically secure random number generator — the same source used for key material. They are not derived from Math.random(), which is predictable and unsuitable for identifiers.
    Can two UUIDs ever collide?
    In theory yes, in practice no. With 122 random bits you would need to generate around 2.7 quintillion v4 UUIDs before reaching a one-in-a-billion chance of a single collision. Every real system hits other limits long before that.
    Should I use v4 or v7 for a database primary key?
    v7, in almost every case. Random v4 keys scatter inserts across a B-tree index, which fragments pages and degrades write throughput as the table grows. v7 keys are time-ordered, so new rows append cleanly and range queries by creation time become possible. The trade-off is that v7 reveals roughly when a record was created.
    What is the difference between a UUID and a GUID?
    Nothing meaningful. GUID is Microsoft's name for the same 128-bit identifier, and the two terms are interchangeable. Microsoft tooling tends to display them uppercase and wrapped in braces, which is why this tool offers both formatting options.
    Are the values generated on your server?
    No. Generation happens in your browser, so no one else — including us — ever sees the values. Nothing is logged or transmitted.