UUID v1, v4 & v7 Generator

All UUIDs are generated locally in your browser using your device's CSPRNG. Nothing leaves your machine.

ZERO UPLOAD · ALL LOCAL
FORMAT

Output (UUIDs)

V1 Time-based
—
V4 Random
—
V7 Time-ordered
—
  1. UUID v1, v4, and v7 are generated automatically on load. Click Regenerate All to get a fresh set at any time.
  2. Use the format toggle to switch between Standard, UPPERCASE, No Hyphens, Braces, and URN display formats. The format applies to all three versions at once.
  3. Click Copy next to any UUID to copy it to the clipboard in the currently selected display format.

When to reach for a UUID

Every distributed system eventually faces the same question: how do two services running on different machines create identifiers that will never collide? Database auto-increment integers fail the moment you split writes across replicas. Random strings work in practice, but without a shared format, parsing and comparing them across languages adds unnecessary friction. UUIDs solve both problems with a 128-bit identifier that requires no central authority and no coordination between services.

UUID generator showing one version 1, one version 4 and one version 7 UUID in standard hyphenated format
One click fills three rows. The version digit sits at the start of the third group (1, 4 or 7), and the v7 value begins with a timestamp, so newer v7 IDs sort after older ones.

A UUID is 32 hexadecimal characters arranged into five groups by hyphens, following the 8-4-4-4-12 pattern. The standard, originally defined in RFC 4122 and updated by RFC 9562 in 2024, specifies multiple versions with different properties.12 Choosing the right version depends on whether you need pure randomness, chronological sortability, or backward compatibility with older systems that expect v1 identifiers.

The versions this tool does not generate

Three versions appear above, because three cover what a paste-and-copy page can do. The rest of the version map serves different jobs. From a namespace and a name, versions 3 and 5 derive a UUID deterministically, through MD5 and SHA-1 hashing respectively, so the same input pair always produces the same identifier, which serves reproducibility rather than randomness. Version 6 takes the v1 timestamp-and-node layout and rearranges its fields into big-endian order, so the value sorts chronologically the way v7 does. Version 8 reserves its bits for custom, application-defined layouts, a space for implementations that need to embed their own meaning in the 128 bits.

So why only three? V4 covers the random default most systems want, v7 the modern database key, and v1 the legacy expectation older interfaces still carry. Each remaining version belongs to a context a generator page cannot follow. For name-based derivation, the work lives with the code that owns the namespace, because the same canonical name has to reach the hash for the result to reproduce, which is a job for a program rather than a paste box. A custom v8 layout belongs to the system that defined it, because only that system knows what its bits mean. The three rows above answer what a paste page can answer; the rest is intentionally out of scope.

The same generation in code

In most systems, a UUID is born in code, and the page above is only one route to one. Every mainstream language ships the same capability: Python's standard uuid module generates versioned UUIDs through functions like uuid4(),3 and Node's crypto module carries the same randomUUID() call this page uses, along with a randomUUIDv7() sibling.4 The major database engines expose UUID functions of their own. For a quick one-off paste, the browser route wins; the code route wins the moment the identifier is born inside the process that stores it, because generation and insert happen in one place.

Whichever route generates the value, one quick check travels with it. The version nibble at position 13 names the generation family at a glance, the same marker the reference box at the bottom of this page lists, so you can identify any arriving value before you trust it. Before wiring a generator call into a schema, confirm which version it emits instead of assuming. The routes genuinely differ: Python's module names a function for the version you want, and Node's crypto module exposes one call for v4 and another for v7, so the version you get is a property of the call you picked rather than of UUIDs in general.34

There is a boundary to state plainly. This page generates one UUID per version on every Regenerate All click, three values in total, and offers no count field of any kind; the shape fits a quick look, not a bulk load. A handful of identifiers is a few clicks. For a batch of hundreds, the code route described above is the right home, where a loop calls the generator function directly and writes the results where they live. No batch feature is claimed here, and none is needed for the job this page does: seeing the three version formats side by side and copying the one you want.

Generating UUIDs in Bulk

When you need more than one identifier at a time, for test fixtures or a data import, clicking once per value stops being practical. The guide below explains what the Regenerate All action produces in one click, a fresh v1, v4 and v7 value side by side, where generating a batch is actually useful, and why every value it creates is generated locally in your browser.

Seeding test fixtures, pre-populating a set of IDs before a data import, or just needing more than one identifier at a time turns a single-UUID generator into a bottleneck fast. Clicking a button once for every value you need does not scale past a handful of rows. This tool's Regenerate All action produces a fresh v1, v4, and v7 identifier together in one click, entirely in your browser, which covers the common case of needing several UUIDs quickly without wiring up a script for a one-off task.

What Regenerate All actually produces

Every click of Regenerate All runs the browser's CSPRNG three separate times, once each for v1, v4, and v7, and replaces all three displayed values at once. None of the three shares any randomness with the others; each is an independent draw seeded from the platform's own random source,1 so generating them together is a convenience, not a shortcut that weakens any individual value.

The format toggle above the three rows applies to all three values simultaneously, so switching to No Hyphens or Braces before copying reformats every row at once instead of requiring you to reformat each identifier individually. That matters most when you are pulling several values in a row for a fixture file that needs one consistent format throughout.

Copying more than one value per click

Each row has its own Copy button, so building a batch of, say, five UUIDs for a fixture file means clicking Regenerate All, copying the value you need, clicking Regenerate All again, and repeating. That is a manual loop rather than a true bulk-export feature, worth knowing before you assume this page can produce a list of a hundred identifiers in one action.

Where bulk generation actually gets used

Pre-populating a set of IDs before a database import is one of the more common reasons to want several UUIDs at once. Rather than letting an import script or a database default generate each identifier at insert time, some workflows need to know the ID values ahead of time, to cross-reference them in a separate related table, or to hardcode them into a test fixture that other code depends on staying stable across test runs.

Test fixtures follow the same pattern. Testing frameworks that support fixtures, such as Rails' ActiveRecord fixtures, are explicit that the entire point of a fixture is a stable, predictable identifier rather than one that changes from run to run,2 and a test suite that seeds five users, ten orders, and twenty line items needs a fixed identifier for each row so foreign-key relationships between fixture files stay consistent every time the suite runs, rather than regenerating randomly and silently drifting between runs. Generating those IDs here, once, and pasting them into the fixture file gives you that stability without hardcoding an ad hoc string that only looks like a UUID.

Why v4 usually fits fixture data better than v7

For fixture and seed data specifically, v4 is usually the more sensible pick over v7, since fixture rows rarely need to sort in creation order and a v7 identifier's embedded timestamp would just record whenever you happened to generate the fixture file, information that has no bearing on the scenario the fixture is meant to represent. Reaching for v4 by default here also keeps the choice consistent with how most test frameworks already treat fixture IDs: arbitrary, stable labels rather than meaningful data, and a v4 value derives all but its version and variant nibbles from random bits, giving 122 bits of entropy per fixture identifier.3

Why generating many values here stays entirely local

Generating dozens of UUIDs one Regenerate All click at a time never sends a single request to a server. Every value comes from your browser's own CSPRNG, running inside the page you already have open,4 so there's no rate limit, no API key, and no network round trip slowing down a workflow that might otherwise involve pinging an external endpoint for every ID.

That local generation is also why this approach scales fine for a modest batch, a handful to a few dozen identifiers for a fixture file or a manual import list, but is not the right tool for generating thousands of IDs programmatically. At that scale, calling crypto.randomUUID() directly in a script, in a loop, is faster and less error-prone than copying values out of a browser tab one click at a time. The specification expects implementations to sustain very high allocation rates, on the order of 10 million UUIDs per second per machine, so a scripted loop is not straining the format at all.3

Choosing between this page and a script

Node.js caches enough random data up front to cover 128 UUIDs per refill, so a scripted loop spends almost no time in the random source itself, which is the practical reason a script wins once the count climbs into the hundreds.5 Either path draws from the same underlying CSPRNG, so a batch generated here and a batch generated by a script carry identical randomness guarantees; the only real difference between them is convenience at scale, not the quality of the values themselves. Neither approach is more correct than the other, and switching from one to the other partway through a project changes nothing about the identifiers you already generated.

A rough rule of thumb: reach for this page when you need a handful of values for a one-off task and would rather not open an editor at all, and reach for a script the moment the count climbs into the hundreds or the generation needs to run automatically as part of a build or seed step.

Use this guide whenever you need a handful of fresh identifiers quickly, to seed test fixtures, pre-populate import IDs, or fill in placeholder values by hand, without writing a script for a one-off task.

Seeding five test users with stable IDs

Before
Before: a test fixture file needs five distinct, stable user IDs that will not change between test runs.
After
Clicking Regenerate All five times and copying the V4 value each time produces five independent UUIDs you can hardcode directly into the fixture file, with no coordination needed between them.

Pre-populating IDs before a bulk database import

Before
Before: an import script needs to know each row's primary key ahead of time so it can reference those IDs in a related table.
After
Generating and copying a V4 value per row here, before running the import, gives you a fixed ID to embed in both the primary import and the related table's foreign-key references, rather than letting the database assign one you would have to look up afterward.
Sources for this section
  1. 1.

    Mozilla Developer Network, "Crypto: getRandomValues() method," developer.mozilla.org, accessed August 2026. https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues

  2. 2.

    Ruby on Rails, "ActiveRecord::FixtureSet," edgeapi.rubyonrails.org, accessed August 2026. https://edgeapi.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

  3. 3.

    Mozilla Developer Network, "Crypto: randomUUID() method," developer.mozilla.org, accessed August 2026. https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID

  4. 4.

    K. Davis, B. Peabody, P. Leach, "Universally Unique IDentifiers (UUIDs)," RFC 9562, IETF, May 2024. https://www.rfc-editor.org/rfc/rfc9562.html

  5. 5.

    OpenJS Foundation, "Crypto," Node.js Documentation, nodejs.org, accessed October 2026. https://nodejs.org/api/crypto.html

FAQ

No hard limit. Each click of Regenerate All runs the browser's CSPRNG again and replaces the three displayed values; there's no rate limit or quota, since nothing about generation touches a server.

Not directly. This page shows one v1, v4, and v7 value per click rather than producing a downloadable list. For dozens of values, clicking Regenerate All and copying the row you need repeats quickly; for hundreds or thousands, calling crypto.randomUUID() in a loop within a script is the more practical approach.

No. The v1, v4, and v7 values from a single click are three independent draws from the browser's random source. None of them is derived from, or predictable from, either of the other two.

v4 generally fits better, since fixture data rarely needs to sort in creation order, and a v7 value would just embed the timestamp of whenever you happened to generate the fixture, information unrelated to what the fixture represents.

No. CapyToolkit doesn't rate-limit or track how many times you click Regenerate All, since every value is produced locally with no server involved. You can generate as many batches as your workflow needs, one click at a time.

At v4's 122 bits of entropy, a repeat within any realistic number of clicks is astronomically unlikely, on the order of 1 in 10 trillion even across a trillion generated values. Manual clicking will never approach a scale where that becomes a practical concern.

UUID v4: the random standard

UUID v4 is the version most developers reach for first, and for good reason: it requires no input beyond a source of randomness, it is supported by every UUID library in circulation, and its 122 bits of entropy make collisions effectively impossible at any realistic scale. The tool generates each v4 UUID using your browser's CSPRNG, so the output is suitable for session tokens, database keys, and public-facing identifiers alike.

The format is simple by design. The version nibble and variant bits occupy only 6 of the 128 bits, leaving the remaining 122 to the random source. That is why the character at position 13 in any formatted v4 UUID is always 4, and the character at position 17 is always 8, 9, a, or b. These fixed positions are a useful sanity check when you are debugging a system that stores or compares UUIDs, because a malformed identifier is immediately obvious from a single character lookup.

How v4 UUIDs are constructed

UUID v4 fills 122 of its 128 bits with cryptographically random data. The remaining 6 bits are fixed: 4 bits encode the version (0100 in binary) and 2 bits mark the variant field required by the RFC.1 Because of this, the character at position 13 in any formatted v4 UUID is always 4. The character at position 17 is always 8, 9, a, or b, reflecting the 2-bit variant prefix.

Your browser generates v4 UUIDs using the platform's CSPRNG, the same source of entropy that secures TLS handshakes. Calling crypto.randomUUID() draws from the operating system's random pool, not from Math.random(), which is not cryptographically secure and must never be used for tokens, identifiers, or anything security-sensitive.5 The native API is available in all modern browsers and in Node.js.

With 122 bits of entropy, the probability of generating the same v4 UUID twice within a set of one trillion identifiers is roughly 1 in 10 trillion.6 At any realistic production scale, collisions simply do not occur. You can generate and store v4 UUIDs freely without a uniqueness check at the application layer.

A paste or a database row can be checked by shape alone, before any tool runs. A well-formed UUID passes three checks in one glance: it holds the 8-4-4-4-12 group shape, every character is hexadecimal, and the nibble at position 13 names a real generation family, the same marker the reference box at the end of this page lists. Break the group shape, carry a character outside the hexadecimal set, or put an impossible digit at position 13, and the value is malformed before any deeper check runs. Reading the marker at position 17 catches the same class of problem from the variant side.

UUID v7: time-ordered for databases

UUID v7 is the newest version in the RFC, added specifically to address the performance problems that v4 causes in database indexes. By encoding a millisecond timestamp in the leading 48 bits, v7 UUIDs sort chronologically as plain strings, which means new inserts always land at the end of a B-tree index rather than at a random page. If you are generating identifiers outside the database and want the benefits of decentralised creation without the index fragmentation cost, v7 is the current best practice.

Why v7 solves the index fragmentation problem

UUID v7 was introduced in RFC 9562 to solve a performance problem that v4 creates in database indexes.6 Its first 48 bits encode a Unix millisecond timestamp in big-endian order. Four version bits follow, then 12 random bits, then 2 variant bits, then 62 random bits. The result is a UUID that sorts chronologically when compared as a plain string. Uniformly random bytes fragment B-tree indexes because every v4 insert lands at a random position in the tree, triggering page splits and write amplification under high-throughput workloads; UUID v7 inserts consistently at the end of the index, the same way auto-increment integers do, without a centralized ID sequence.

The first 12 hexadecimal characters of a v7 UUID encode the creation timestamp.7 Interpreting them as a 48-bit big-endian integer gives you Unix milliseconds since the epoch. The character at position 13 is always 7, confirming the version. For new tables where you control the primary key format, v7 is the current best practice when your system generates keys outside the database itself.

UUID v1: time-based with a node field

UUID v1 encodes a 60-bit timestamp counting 100-nanosecond intervals since October 15, 1582 (the date of the Gregorian calendar reform).2 The node field, occupying the final 48 bits, was originally designed to hold the MAC address of the generating machine. This ensured that two machines generating identifiers at the same instant would still produce distinct values without any coordination. The timestamp byte order places the least significant bits first, so v1 UUIDs do not sort chronologically as strings even though they contain a timestamp.

Modern systems generally avoid v1 in new designs. Using a real MAC address embeds a hardware identifier into every UUID, which creates a privacy concern when those identifiers appear in logs, URLs, or API responses. For both reasons, v7 is the preferred time-based option in RFC 9562. Since browsers expose no MAC address through any API, this tool follows the RFC 4122 recommendation for restricted environments: the node field uses 6 cryptographically random bytes with the multicast bit set to 1. The result is a valid v1 UUID that carries no identifying hardware information.

Display formats

A UUID is a single 128-bit value, but the way it is written down matters as much as the value itself because different consumers expect different conventions. The tool exposes five common representations, each of which you can copy with one click, so the generated identifier drops into your target system without any manual reformatting.

Choosing the right format for your use case

The same 128-bit value can be rendered in several conventions depending on what the consuming system expects. Lowercase with hyphens is the canonical RFC format and the most portable choice for APIs, log files, and databases. UPPERCASE is required by some Windows APIs and older enterprise systems that predate the RFC. The no-hyphen format removes all four hyphens, producing a 32-character string that some ORMs and databases use internally to reduce storage overhead on indexed columns.

Braces formatting, common in Microsoft COM-era specifications, wraps the standard form in curly braces. The URN format prefixes the UUID with urn:uuid:, which is the registered URI scheme defined in RFC 4122. Use the URN form when the identifier needs to appear in an XML document, an RDF graph, or another context that requires a globally resolvable URI. Switching between formats here reformats the stored value client-side without re-generating. The underlying UUID is identical in all five representations.

The two Microsoft-flavored formats on this page carry a name with their lineage. GUID, short for Globally Unique Identifier, is the Microsoft ecosystem's word for the same 128-bit value: the standard that defines UUIDs names them one and the same, so a GUID and a UUID are the same identifier under different naming. From that lineage come the UPPERCASE and Braces spellings on this page. What that means for you is simple: choosing a format is choosing a convention for the consumer, never a different identifier, and all five renders of one generated value are that one value.

Case is the last question the UPPERCASE toggle raises, and the answer is short: case never touches the bits. A UUID's letters are hexadecimal digits, so changing case changes only the spelling of the string, never the 128-bit value it names. Under the RFC's string grammar, all uppercase, all lowercase, and mixed case are equally legal, so both spellings of one value are the same UUID. The practical rule is to generate in one case, compare in that same case, and where a downstream system compares strings raw, match its convention instead of mixing spellings. The Standard format here spells the value in lowercase; the UPPERCASE toggle changes the spelling, never the value.

UUID Version Marker Reference

  • Always 4
  • Always 8, 9, a, or b
  • Always 7
  • ~1 in 10 trillion per 1 trillion IDs

Check a UUID generated above against these fixed positions to confirm its version at a glance.

Sources
  1. 1.

    K. Davis, B. Peabody, P. Leach, "Universally Unique IDentifiers (UUIDs)," RFC 9562, IETF, May 2024. https://www.rfc-editor.org/info/rfc9562

  2. 2.

    P. Leach, M. Mealling, R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace," RFC 4122, IETF, July 2005. https://www.rfc-editor.org/info/rfc4122

  3. 3.

    Python Software Foundation, "uuid — UUID objects according to RFC 9562," docs.python.org, accessed September 2026. https://docs.python.org/3/library/uuid.html

  4. 4.

    Node.js, "Crypto (crypto.randomUUID)," nodejs.org, accessed September 2026. https://nodejs.org/api/crypto.html

  5. 5.

    Mozilla Developer Network, "Crypto: randomUUID() method," developer.mozilla.org, accessed September 2026. https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID

  6. 6.

    "Universally Unique Identifier," Wikipedia, accessed September 2026. https://en.wikipedia.org/wiki/Universally_unique_identifier

  7. 7.

    PostgreSQL Global Development Group, "UUID Functions: uuidv7()," postgresql.org, accessed September 2026. https://www.postgresql.org/docs/current/functions-uuid.html

FAQ

A UUID (Universally Unique Identifier) is a 128-bit number formatted as 32 hexadecimal characters split into five groups by hyphens, following the pattern 8-4-4-4-12. The format is standardized in RFC 9562, which means any language or database that handles UUIDs can parse and compare them interchangeably. You can generate them without a central authority or any coordination between services.

UUID v4 is purely random and the most widely used version — 122 of its 128 bits come from a cryptographically secure random source. UUID v7 encodes a Unix millisecond timestamp in its first 48 bits, which makes it sort chronologically as a string. This is useful as a database primary key because new rows always insert at the end of the index rather than at random positions. UUID v1 also encodes a timestamp, but in a byte order that does not produce lexicographic sort and was originally tied to the generating machine's MAC address.

UUID v4 is safe for use as a token, session ID, or CSRF nonce because it uses the browser's CSPRNG, the same entropy source that protects TLS key generation. It is not safe to use Math.random() for this purpose, but crypto.randomUUID() is. This tool generates all UUIDs using crypto.randomUUID() or crypto.getRandomValues(), so the output is cryptographically random.

For new tables, v7 is generally the better choice. UUID v4's random distribution fragments B-tree indexes, which increases write amplification under high insert rates. UUID v7 inserts in timestamp order, behaving like an auto-increment integer while still being decentrally generated. If your system already uses v4 and the table is not under heavy write load, switching is not urgent.

No. CapyToolkit generates all UUIDs entirely in your browser using browser-native APIs. Nothing leaves your device. You can verify this by opening DevTools, going to the Network tab, and clicking Regenerate All — no outbound requests appear.

All five formats encode the same 128-bit value. Standard (lowercase with hyphens) is the canonical RFC format and works in virtually every system. UPPERCASE is required by some older Windows and COM APIs. No Hyphens is a compact 32-character form used internally by some databases and ORMs. Braces wrap the standard form in curly braces, common in Microsoft COM specifications. URN prefixes the UUID with urn:uuid:, which is the registered URI scheme for UUIDs — useful in XML documents and RDF graphs.