How to generate GUIDs
- Set how many GUIDs you need.
- Tick Uppercase and {Braces} for the classic Windows registry and Visual Studio format, such as
{3F2504E0-4F89-41D3-9A0C-0305E82C3301}, or leave them off for the lowercase form used by most APIs. - Tick "Quoted", to get a list ready for a C# array, JSON or a SQL
IN (...)clause. - Press Generate and copy or download the list.
GUID vs UUID
A GUID (globally unique identifier) is Microsoft's name for a UUID. The two are the same 128-bit value and are fully interchangeable: Guid.NewGuid() in .NET produces a random version 4 UUID, exactly like the ones here, and SQL Server's uniqueidentifier column stores them. The only differences are cosmetic: Windows tools traditionally display GUIDs in uppercase and often inside braces.
Use GUIDs for COM class IDs, MSI product codes, entity keys in Entity Framework, correlation IDs and anywhere a unique key must be created without asking a database. In SQL Server, random GUIDs as clustered primary keys cause index fragmentation; consider NEWSEQUENTIALID() or UUID v7 for large tables.
All values are generated with a cryptographically secure random generator in your browser and never leave your device.
FAQ
How do I create a GUID in C#?
Call Guid.NewGuid(). Use .ToString("B").ToUpper() for the braced uppercase format or .ToString("N") for 32 digits with no hyphens.
How do I insert a GUID in SQL Server?
Use NEWID() in T-SQL, or paste a generated value as a string literal, such as '3F2504E0-4F89-41D3-9A0C-0305E82C3301'.
Is a GUID case-sensitive?
No. GUIDs are hexadecimal, so upper and lower case represent the same value, though string comparisons in code may need to ignore case.