UUID / GUID GeneratorGenerate one or one hundred identifiers instantly in the browser
Produce RFC-style v4 UUIDs locally with optional uppercase output and hyphen removal for systems that want compact or normalized identifiers.
Reading a version 4 UUID
A UUID is 128 bits written as five hyphen-separated hex groups. In a version 4 UUID the first digit of the third group is always 4, and the first digit of the fourth group is one of 8, 9, a or b (the variant bits 10). The other 122 bits are random, as RFC 9562 section 5.4 defines.
You can verify the bit handling by hand. Take the 16 bytes 00 01 02 … 0f. Byte 6 (06) keeps its low nibble and gets version 4 in the high nibble, giving 46. Byte 8 (08) keeps its low six bits and gets 10 in the top two, giving 88. The result is 00010203-0405-4607-8809-0a0b0c0d0e0f, which is what this tool's formatter returns for those bytes. Python agrees:
import uuid
uuid.UUID(bytes=bytes(range(16)), version=4)
# UUID('00010203-0405-4607-8809-0a0b0c0d0e0f')Versions defined in RFC 9562
RFC 9562 (May 2024) obsoletes RFC 4122. This page's tool generates version 4 only, using crypto.randomUUID() when the browser has it and crypto.getRandomValues() otherwise.
| Version | What it is | Typical use |
|---|---|---|
| 1 | Gregorian time-based | Legacy time-ordered IDs |
| 3 | Name-based, MD5 | Stable ID derived from a name |
| 4 | Random or pseudorandom | General-purpose unique IDs (this tool) |
| 5 | Name-based, SHA-1 | Stable ID derived from a name |
| 6 | Reordered Gregorian time-based | Sortable replacement for v1 |
| 7 | Unix Epoch time-based | Database keys that sort by creation time |
| 8 | Custom format | Application-defined layouts |
Collisions, and what a UUID is not
With 122 random bits, the chance of any collision among n identifiers is roughly n² / 2123. For one billion UUIDs that is about 9.4e-20; reaching even odds takes around 2.7e18 UUIDs. This holds only if the random source is sound. RFC 9562 section 8 is explicit that implementations should not assume UUIDs are hard to guess and must not use them as security capabilities, meaning an ID whose mere possession grants access. Use a dedicated token generator for session or reset links.
Using UUIDs as database keys
RFC 9562 notes that random UUIDs such as v4 have poor index locality, because new rows land at random positions in a B-tree, and that time-ordered v6 and v7 keep new values near each other. If insert performance on a large table matters, consider v7. This tool does not generate it, but common runtimes do:
// JavaScript (browser and Node.js)
crypto.randomUUID() // v4
# Python
import uuid
uuid.uuid4() # v4
uuid.uuid7() # v7, Python 3.14+
-- PostgreSQL 18+
SELECT gen_random_uuid(), uuidv7();Questions
- Is a GUID different from a UUID?
- No. RFC 9562 treats GUID as another name for the same 128-bit identifier.
- Do the uppercase and no-hyphen options change the value?
- Not the underlying 128 bits. RFC 9562 allows uppercase, lowercase or mixed-case hex, but the hyphenated form is the standard text representation, so check what the receiving system expects before stripping hyphens.