Skip to content
AgileLogics

UUID Generator

Generates cryptographically random version 4 (random) UUIDs using the browser's Web Crypto API.

How it works

Click Generate to create a new UUID. Click again for another one.

What is a UUID?

A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits in five hyphen-separated groups, like f6405cdc-b4a1-4b28-9ee6-de03e2e05d75. Systems use UUIDs to label records, files, requests and devices with IDs that won't clash, even when they're created on different machines with no central counter to coordinate them.

The format is standardized in RFC 9562, which replaced the original RFC 4122 in 2024. This tool generates version 4 UUIDs, the kind built from random numbers.

How to generate a UUID

  1. Click Generate. A new UUID appears in the output panel.
  2. Click Copy to put it on your clipboard.
  3. Click Generate again whenever you need another one.

There's no input box because there's nothing to configure. Each UUID is created in your browser by crypto.randomUUID(), and none are logged or stored, so the page can't hand the same value to anyone else.

Anatomy of a version 4 UUID

Here are three UUIDs generated by this tool:

f6405cdc-b4a1-4b28-9ee6-de03e2e05d75
61e62b30-b967-4e15-a803-fd20cfccd3da
18a782c1-c35d-4010-a251-fdf3df3c5b9b

They look random, but two positions are fixed in every one:

Part Example Meaning
Groups of 8-4-4-4-12 hex digits f6405cdc-b4a1-4b28-9ee6-de03e2e05d75 36 characters including 4 hyphens
First digit of the third group 4 in 4b28 Version 4 (random)
First digit of the fourth group 9 in 9ee6 Variant, always 8, 9, a or b for RFC 9562 UUIDs
Everything else 122 random bits

So if you see a UUID with a 4 in that position, it was almost certainly generated randomly. A 1 or a 7 there means a time-based version instead. Output is in lowercase. RFC 9562 allows uppercase, lowercase or mixed case, so convert it if a system you're feeding expects capitals.

How unique is "unique"?

The 122 random bits give about 5.3 × 10^36 possible version 4 UUIDs. Collisions follow the birthday problem, so they become likely much sooner than that number suggests, but still far beyond any real workload: you'd need around 2.7 × 10^18 UUIDs for a 50% chance that any two match. Generating a billion every second, that takes about 86 years.

That figure assumes a good random source, where every bit is equally likely to be 0 or 1. A weak generator like Math.random() gives no such guarantee, which is why this tool relies on the browser's cryptographically secure one.

Choosing a UUID version

Version Built from Good for
v4 Random bits General-purpose IDs where order doesn't matter (this tool)
v7 Unix timestamp plus random bits Database primary keys that should sort by creation time
v1 Timestamp and node ID Legacy systems; can reveal when and where it was created
v5 SHA-1 hash of a namespace and name The same input always giving the same UUID

RFC 9562 points out that random versions like v4 have poor database-index locality: new values land at random places in the index instead of next to each other, and section 6.11 says the real-world difference against time-ordered IDs "can be one order of magnitude or more". If you're designing a new table with UUID primary keys, v7 is usually the better choice. For request IDs, file names and other identifiers that aren't indexed in insertion order, v4 is fine.

Related generators

Last updated

Frequently asked questions

Is this UUID generator cryptographically secure?
Yes. It calls the Web Crypto API's crypto.randomUUID(), which the specification requires to use a cryptographically secure random number generator. It doesn't use Math.random().
Can two generated UUIDs ever be the same?
In theory yes, in practice no. A version 4 UUID has 122 random bits, about 5.3 × 10^36 possible values. You'd need to generate around 2.7 × 10^18 of them before the chance of a single duplicate reached 50%, which at a billion per second would take about 86 years.
What's the difference between a UUID and a GUID?
Nothing practical. GUID (globally unique identifier) is the name Microsoft uses for the same 128-bit format. A v4 UUID from this page works anywhere a GUID is expected.
Can I generate several UUIDs at once?
The tool creates one UUID per click. Click Generate again for the next one; each click produces a new, independent value.
Should I use a UUID as a password or API secret?
Use a purpose-built generator for secrets instead. A v4 UUID has 122 bits of randomness, which is plenty for an identifier, but its fixed format and hyphens make it awkward as a password, and some systems treat UUIDs as public IDs that end up in logs and URLs.