How to use the GUID generator
- Pick a Format: Registry / .NET “B” (with braces), .NET “D” (no braces), .NET “N” (32 digits, no hyphens), .NET “P” (in parentheses) or .NET “X” (C# struct initialiser).
- Leave Uppercase ticked for Windows-style capitals, or untick it for lowercase.
- Set How many GUIDs, from 1 to 500 (5 by default), and press Generate.
- Copy one value or the whole list.
What it does and when to use it
Windows and .NET use GUIDs everywhere: COM class and interface IDs, registry keys, MSI product and upgrade codes, Visual Studio project IDs, and primary keys in SQL Server tables (uniqueidentifier). Each place tends to expect one particular spelling. Picking the right format here saves you from adding braces or stripping hyphens by hand.
The five formats match what Guid.ToString("B"), ("D"), ("N"), ("P") and ("X") produce in .NET:
| Format | Shape |
|---|---|
| B | {xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx} |
| D | xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx |
| N | 32 hex digits, no separators |
| P | (xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx) |
| X | {0x…,0x…,0x…,{0x…,0x…,0x…,0x…,0x…,0x…,0x…,0x…}} |
If you need options beyond these, such as time-ordered version 7 IDs, use the UUID generator. For shorter IDs in URLs, the Nano ID generator is a better fit.
How it works
Each GUID starts as 16 random bytes from crypto.getRandomValues. The tool then sets six fixed bits: the version digit becomes 4 (the first digit of the third group), and the variant bits make the first digit of the fourth group 8, 9, A or B. That leaves 122 random bits. The X format splits the same 32 hex digits into one 8-digit, two 4-digit and eight 2-digit parts.
Worked examples
- C# struct form. Format X, Uppercase off, one GUID. The output looks like
{0xcd343f7c,0x5dde,0x4aaa,{0xa9,0xf7,0xe5,0xd5,0x30,0xee,0xca,0x9d}}. The inner,{0xbefore the last eight bytes is always there. - Spotting the version. In every X-format GUID the third part starts with
0x4, the version 4 marker. In the B, D and P formats the same 4 starts the third group. - Registry style. Format B with the defaults gives values such as
{FCD5EED0-FF5B-4992-8356-EEE8931EE8A2}.
Limits and tips
- These are random IDs, not sequential ones. In a clustered SQL Server index, random keys can cause page splits; consider
NEWSEQUENTIALID()or ULIDs if insert speed matters. - A GUID is unique, not secret. Do not use one as a password or an access token.
- Values in the examples above are samples; your list will be different every time.
Frequently asked questions
Is a GUID the same as a UUID?
Which format should I pick?
Can two generated GUIDs ever be the same?
Why are they uppercase by default?
Does a GUID reveal my computer or the time?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.