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
- Click Generate. A new UUID appears in the output panel.
- Click Copy to put it on your clipboard.
- 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
- Password generator: random passwords with a configurable length and character set.
- Hash generator: SHA-256 and other checksums of text.
- MD5 generator: MD5 hashes for legacy checksums.
- Lorem ipsum generator: placeholder text to go with test records.
Last updated