UUID v4 Generator

VersionRandomnessBest for
v1timestamp + MAC addresstime-sortable, but leaks machine identity
v3MD5 hash of a namesame name, same UUID, legacy
v4122 random bits (this tool)the default choice - no clock, no identity leak
v5SHA-1 hash of a namedeterministic IDs, v3 done right
v7millisecond timestamp + randomdatabase-friendly, added by RFC 9562 in 2024
How safe from collisions? The usable space is 122 bits, and by birthday math you would need to generate roughly 103 trillion v4 UUIDs before a single duplicate becomes as likely as 1 in a billion. Generating 5 at a time, you will never meet a collision; the risk model that matters in practice is a buggy random source, not the math - which is why this page uses crypto.getRandomValues, the browser's cryptographic generator, not Math.random.
Which version to use? For IDs in databases, logs, test fixtures and APIs, v4 is the answer 95% of the time. Reach for v7 when you need IDs that sort by creation time (they index better in databases), and v5 when different systems must derive the identical UUID from the same name independently. Official source: RFC 9562.
Generating other kinds of identifiers? The password generator covers human-typed secrets, the random number generator covers ranges and dice math, and Base64 encode-decode packs binary into text-safe form.

A UUID v4 is 122 bits of pure randomness dressed in a standard format: 32 hex digits, five groups, one fixed 4 (the version) and one fixed 8-b-or-9-a-or-b nibble (the variant) - everything else comes from your browser's crypto-quality random source, here and now, not from a server that logs what you generated. Generate up to 50 at a time, pick a format, and copy the whole batch in one click.

The number worth knowing: you would need to generate about 100 trillion v4 UUIDs before the chance of even one collision reaches 1 in a billion - which is why databases, distributed systems and offline apps lean on them instead of a central counter. This tool follows RFC 9562 (the 2024 revision that added v7) and keeps every byte local: nothing you generate is transmitted, logged or remembered anywhere but this page.

How to use

  1. Set how many UUIDs you need (1-50) and pick a format: standard, uppercase, or no hyphens.
  2. Hit Generate - the batch appears instantly, computed with crypto.getRandomValues in your browser.
  3. Copy all to paste the list anywhere: test fixtures, database seeds, config files.

Frequently asked questions

What is the difference between UUID and GUID?

None in practice - GUID is Microsoft's name for the same 128-bit identifier format, and Windows tools generate v4-style random GUIDs that are bit-for-bit compatible with UUIDs everywhere else. The RFC calls it UUID; codebases on .NET, SQL Server and Active Directory say GUID; the bytes follow the same rules.

Can I just use the first 8 characters of a UUID?

Not if uniqueness matters. Shortening to 8 hex digits leaves 32 bits of randomness - about 4 billion values - so 77,000 items already give you even odds of a duplicate (the birthday math that makes full v4 safe works against you the moment you truncate). If you need shorter IDs, use a counter you control or a proper short-ID scheme, not a trimmed UUID.

Why does every UUID v4 have a 4 in the same spot?

The 13th hex digit is the version field - a fixed 4 means 'random' - and the 17th hex digit is the variant, limited to 8, 9, a or b. Those 6 bits are metadata, not randomness, which is why v4 carries 122 random bits rather than the full 128. Seeing 4xxx there is the format working, not a coincidence.

Is my data or my UUIDs uploaded anywhere?

No - generation runs entirely in your browser via crypto.getRandomValues, and nothing is sent to any server. The tool remembers your count and format choices in this browser's local storage so repeat sessions start where you left off; clear your browser data and that memory is gone.

Related tools