Free UUID Generator

Generate RFC 9562 compliant UUIDs one at a time or ten thousand at once — versions 1, 3, 4, 5, 6 and 7, plus a decoder that tells you what is inside any UUID you paste in. Everything runs in your browser.

UUID version

Format

Recently generated

    What is a UUID?

    A UUID (Universally Unique Identifier) is a 128-bit label written as 32 hexadecimal digits in five hyphen-separated groups — 8-4-4-4-12, as in 3f2504e0-4f89-41d3-9a0c-0305e82c3301. Its purpose is to let independent systems mint identifiers that will not collide, without any of them having to ask a central authority for permission.

    UUIDs are defined by RFC 9562, published in May 2024, which replaced the older RFC 4122 and added versions 6, 7 and 8. Microsoft calls the same 128-bit structure a GUID (Globally Unique Identifier); the two words describe the identical format and are used interchangeably.

    Of those 128 bits, 4 identify the version and 2 identify the variant, so a version 4 UUID carries 122 bits of randomness — about 5.3 × 1036 possible values.

    Database keys

    Primary keys that can be generated by the application before an INSERT, and that never clash when data from several shards is merged.

    Distributed systems

    Correlation and trace identifiers that many services can create at once with no coordination between them.

    Files and resources

    Upload names, idempotency keys, session tokens and message identifiers that stay unique across machines.

    UUID versions compared

    The version number is the 13th hexadecimal digit — the first character of the third group. In 3f2504e0-4f89-41d3-9a0c-0305e82c3301 that digit is a 4, so it is a version 4 UUID.

    Comparison of UUID versions 1 through 8
    Version Built from Sortable by time Repeatable Use it when
    v1 60-bit timestamp + clock sequence + node (normally the MAC address) No — the timestamp is stored low bits first No You need a timestamp inside the identifier and already have v1 data.
    v2 Version 1 with a POSIX UID or GID substituted in No No Essentially never. It is a DCE Security relic and RFC 9562 omits it.
    v3 MD5 hash of a namespace UUID plus a name No Yes You need the same input to always yield the same UUID and must match existing v3 data.
    v4 122 random bits from a CSPRNG No No The default. Choose this unless you have a specific reason not to.
    v5 SHA-1 hash of a namespace UUID plus a name No Yes You need deterministic UUIDs. Preferred over v3 for new work.
    v6 Version 1 with the timestamp bits reordered Yes No You are migrating away from v1 but want index-friendly ordering.
    v7 48-bit Unix millisecond timestamp + 74 bits of randomness Yes No Database primary keys. This is the modern recommendation.
    v8 Whatever you define, keeping only the version and variant bits fixed Depends Depends You have a genuinely custom layout and want it to still be a valid UUID.

    Which version should you use?

    • Storing rows in a database? Use v7. Because the timestamp leads, new rows land at the right-hand edge of a B-tree index instead of scattering across it, which is the difference between a healthy index and a fragmented one.
    • Just need an identifier? Use v4. It is universally supported and reveals nothing about when or where it was created.
    • Need the same input to always produce the same UUID? Use v5.
    • Worried about leaking timing information? Avoid v1, v6 and v7 — anyone holding one of those can read the creation time straight out of it. Use v4.

    How to generate a UUID

    1. Pick a version Version 4 is selected by default and is the right answer most of the time. Switch to v7 if the UUID will become a database key.
    2. Read the value A UUID appears as soon as the page loads. Press Generate new UUID, or the G key, for another.
    3. Adjust the formatting Toggle uppercase, hyphens, braces or quotes. Changing these reformats what is on screen without generating a new value.
    4. Copy or export Press Copy or the C key. For many at once, use the Bulk tab and download as .txt, .json, .csv, .sql, .ts or .xml.

    Generate a UUID in code

    Most languages can do this without a dependency. Here is the shortest correct way in each.

    // Browsers and Node 19+. Secure contexts only (HTTPS or localhost).
    const id = crypto.randomUUID();
    
    // Node.js, explicit import
    import { randomUUID } from "node:crypto";
    const id2 = randomUUID();
    
    // Version 7, via the uuid package
    import { v7 as uuidv7, v5 as uuidv5, NIL } from "uuid";
    const ordered = uuidv7();
    const stable  = uuidv5("example.com", uuidv5.DNS);

    How unique is a UUID, really?

    Version 4 UUIDs carry 122 random bits, giving 2122 ≈ 5.3 × 1036 possible values. You would need to generate roughly 2.71 × 1018 of them before reaching a 50% chance that any two matched.

    A more useful way to hold it: across 103 trillion version 4 UUIDs, the probability that even one duplicate exists is about one in a billion. Put differently, generating a billion UUIDs per second, it would take around 85 years to reach even odds of a single collision.

    The caveat that actually matters in practice: this only holds when the values come from a cryptographically secure random source. A generator built on Math.random() or a seeded pseudo-random number generator has far less real entropy than the bit count suggests, and duplicates become plausible. This page uses crypto.getRandomValues(), which draws from the operating system CSPRNG.

    How this tool works

    Every UUID on this page is produced by JavaScript running in your own browser. Nothing is sent to a server, nothing is logged, and the page keeps working with the network switched off once it has loaded.

    • Randomness comes from crypto.getRandomValues(), the browser interface to the operating system CSPRNG. If a browser does not provide it, the page refuses to generate rather than falling back to something weaker.
    • Version 1 and 6 normally embed the machine MAC address as the node field. This page substitutes a random node with the multicast bit set, exactly as RFC 9562 permits, so no hardware identity is exposed.
    • History is held in your browser localStorage, capped at the 40 most recent values. It never leaves the device, and the Clear button removes it.
    • The JSON API is the one part that involves a server. It generates with PHP random_bytes() and stores nothing.

    Frequently asked questions

    Is a UUID the same thing as a GUID?

    Yes. GUID is Microsoft terminology for the same 128-bit identifier described by RFC 9562. The only differences you will meet are cosmetic: Microsoft tooling often prints them in uppercase and wrapped in braces, as {3F2504E0-4F89-41D3-9A0C-0305E82C3301}. Use the Braces and Uppercase toggles above to produce that form.

    Which UUID version should I use for a database primary key?

    Version 7. Its leading 48 bits are a Unix millisecond timestamp, so newly generated values sort after older ones. Inserts append to the right-hand edge of a B-tree index rather than landing at random positions, which avoids the page splits and index fragmentation that make random v4 keys expensive at scale. If your database or ORM has no v7 support yet, v4 is still perfectly correct, just less friendly to the index.

    Are the UUIDs from this page cryptographically secure?

    The randomness is. Versions 4 and 7 draw from crypto.getRandomValues(), which is backed by the operating system CSPRNG, so the values are unpredictable. That said, a UUID is an identifier, not a secret. It is fine as a hard-to-guess URL component, but do not use one as a password, an API key or a session token where a dedicated secret of the proper length belongs.

    Can two UUIDs ever be the same?

    It is possible but vanishingly unlikely. Across 103 trillion version 4 UUIDs the chance that any duplicate exists is about one in a billion. Collisions in the wild almost always trace back to a broken generator rather than bad luck: a seeded PRNG, a virtual machine cloned along with its random state, or code using Math.random() instead of a CSPRNG.

    Can I tell when a UUID was created?

    For versions 1, 6 and 7, yes — the creation time is encoded in the value itself, and the Decode tab on this page will read it out for you. For versions 3, 4 and 5 there is no timestamp to recover. This cuts both ways: if the creation time is something you would rather not publish, do not use a time-based version.

    What is the difference between UUID v3 and v5?

    Only the hash function. Version 3 uses MD5, version 5 uses SHA-1. Both are deterministic: the same namespace and name always produce the same UUID, which is what makes them useful for deriving a stable identifier from something you already have, such as a URL or an email address. Prefer v5 for anything new. Neither is a security mechanism — given the UUID, the original name is not recoverable, but nor is it protected by a secret.

    How many UUIDs can I generate here at once?

    Up to 10,000 per batch in the Bulk tab, with no daily cap and no account. The JSON API is limited to 1,000 per request to keep the server responsive. Batch generation happens locally, so a run of 10,000 completes in a few milliseconds.

    Is the NIL UUID a valid UUID?

    Yes. The NIL UUID, 00000000-0000-0000-0000-000000000000, is explicitly defined by RFC 9562 as the conventional value for none, unset or not applicable. RFC 9562 also defines its opposite, the MAX UUID of all ones, which sorts after every other UUID and is handy as an upper bound in range queries. Both are available from the version picker above.

    Do I need to pay or sign up?

    No. The generator and the JSON API are both free, need no account, and have no usage cap beyond the per-request limits described above.