UUID Generator

Click generate for a fresh RFC 4122 UUID. Bulk-create up to 500 at once and copy them all.

Format
Choose a version and click Generate to create UUIDs.

    What a UUID actually is, and where you use one

    A UUID (Universally Unique Identifier) is a 128-bit value written as 32 hexadecimal digits in the pattern 8-4-4-4-12, for example f47ac10b-58cc-4372-a567-0e02b2c3d479. Its whole purpose is to let independent machines mint identifiers that will not collide without ever coordinating through a central authority. That property is why UUIDs show up as database primary keys, idempotency keys on payment APIs, correlation IDs threaded through microservice logs, message IDs on a queue, filenames for uploaded assets, and session identifiers. Microsoft calls the same 128-bit structure a GUID, so anything produced here works wherever a GUID is expected.

    Using the generator

    1. Pick a version — v4 (random), v7 (time-ordered), or Nil (all zeros).
    2. Set How many (1–500) to create a single value or a whole batch at once.
    3. Toggle Uppercase, Hyphens, and Wrap in braces to match the exact format your database, language, or config file expects — the toggles reformat the current batch instantly without drawing new random values.
    4. Copy one row at a time, or use Copy all to grab the whole batch as newline-separated lines.

    Anatomy: version and variant bits

    Not every one of the 128 bits is random. Four bits encode the version (the first digit of the third group — a 4 for v4, a 7 for v7) and two bits encode the variant (which forces the first digit of the fourth group to be 8, 9, a, or b). That leaves 122 free bits in a v4 UUID. Those fixed bits are why a valid v4 always looks like xxxxxxxx-xxxx-4xxx-{8,9,a,b}xxx-xxxxxxxxxxxx, and why you can glance at a string and tell which version produced it.

    Worked examples

    1. Reading a v4. In 9b2e4f6a-1c3d-4e5f-a7b8-c9d0e1f2a3b4, the 4 opening the third group marks it version 4, and the a opening the fourth group is the variant marker. Everything else is randomness from your browser's cryptographic generator — 122 bits, about 5.3×1036 possibilities.
    2. Decoding the time inside a v7. A v7 UUID begins with a 48-bit Unix millisecond timestamp. If a value starts 01890a5d-ac96-7..., those first 12 hex digits (01890a5dac96) equal 1,686,835,215,000 ms — about 2023-06-15 in UTC. That embedded time is exactly why v7 values sort in creation order.
    3. Collision math. To reach a 50% chance of any collision among random v4 UUIDs you would need roughly 2.7×1018 of them (the birthday bound on 122 bits). Generating a billion every second, that is on the order of a century — which is why "just use a v4" is a safe answer for uniqueness at any normal scale.

    Choosing a version

    VersionRandom bitsSortable?Best for
    v4 — random122NoGeneral IDs, anything where opacity matters
    v7 — time-ordered74Yes (by time)Database keys, B-tree indexes, event streams
    Nil0A placeholder / "no ID yet" sentinel

    Common mistakes and practical tips

    Limits

    A UUID guarantees uniqueness, not meaning — it carries no information about the row it labels beyond, for v7, a timestamp. It is also far longer than a 32- or 64-bit integer, so it costs more storage and index space; that trade is usually worth it for the freedom to generate keys anywhere without coordination.

    Sources & further reading

    Frequently asked questions

    What is a UUID, and is a GUID the same thing?

    A UUID (Universally Unique Identifier) is a 128-bit value defined by RFC 4122 (updated by RFC 9562), written as 32 hexadecimal digits in five hyphen-separated groups like 550e8400-e29b-41d4-a716-446655440000. GUID (Globally Unique Identifier) is Microsoft's name for exactly the same thing, so this UUID generator doubles as a GUID generator. Because a random UUID draws from 2^122 possibilities, anyone can create one independently on any machine — no central registry — and still trust it will not collide.

    UUID v4 vs UUID v7 — which one should I use?

    A UUID v4 generator produces 122 bits of pure randomness — perfect as a general random UUID whenever you just need uniqueness. A UUID v7 generator produces time-ordered values: the first 48 bits are a Unix millisecond timestamp, so v7 UUIDs sort chronologically. That makes v7 ideal for database primary keys and B-tree indexes, where sequential inserts stay compact and fast instead of scattering across the index the way random v4 keys do. Choose v4 for opacity and no time leakage; choose v7 when insert locality and sortability matter.

    Are these UUIDs really unique and random?

    Yes. Every random value comes from crypto.getRandomValues (using crypto.randomUUID where the browser offers it) — the cryptographically secure generator built into your browser, never the predictable Math.random. With 122 random bits, the odds of two v4 UUIDs colliding are astronomically small: you would have to generate billions per second for roughly a century before a collision became likely. If a browser is too old to provide a secure generator, this tool disables itself instead of silently falling back to something insecure.

    Are the generated UUIDs sent anywhere?

    No. This uuid generator runs 100% in your browser — every UUID v4, UUID v7 and nil value is created locally in JavaScript, and nothing is ever uploaded, logged, or shared. That makes it safe for API keys, database rows, secrets, and test fixtures. The values are one-shot: reload the page and they are gone, because nothing is stored.

    How do I generate UUIDs in bulk and copy them all at once?

    Set the count to any number from 1 to 500 and click Generate to create a whole batch. Each row has its own copy button, or use "Copy all" to put the entire list on your clipboard as newline-separated lines — perfect for seeding a database, filling a test dataset, or pasting into a spreadsheet. The format toggles (Uppercase, Hyphens, and Wrap in braces) reformat the current batch instantly without regenerating, so you can match whatever your database or code expects.