GUID Generator

Random GUIDs for .NET and SQL Server, in bulk

Version

GUIDs (v4)

GUID Generator guide

GUID is Microsoft's name for a UUID: the same 128-bit identifier, used across .NET, SQL Server, COM, and the Windows registry. This generator creates GUIDs in your browser, one at a time or up to 1,000 at once, in the format your code expects.

GUID or UUID?

They are the same thing. Guid.NewGuid() in C# returns a random version 4 UUID, and SQL Server's uniqueidentifier stores the same 16 bytes. Any GUID from this page works wherever a UUID is expected, and the other way round. Since .NET 9, Guid.CreateVersion7() makes time-ordered version 7 GUIDs, which the v7 option here also produces.

Formats

  • Default. 8-4-4-4-12 in lowercase, the same as Guid.ToString().
  • Uppercase. As SQL Server Management Studio and many Windows tools show them.
  • Braces { }. The registry and COM format, and what Guid.ToString("B") returns.
  • No hyphens. 32 digits in a row, as Guid.ToString("N") returns.

Using a GUID in code

// C#
var id = Guid.Parse("0192f0c1-7b3a-7cde-8f00-123456789abc");

-- SQL Server
DECLARE @id uniqueidentifier = '0192F0C1-7B3A-7CDE-8F00-123456789ABC';

Frequently asked questions

What is the difference between a GUID and a UUID?
None in practice. GUID is Microsoft's term and UUID is the standard one, and both name the same 128-bit identifier.
How do I generate a GUID in C#?
Call Guid.NewGuid() for a random GUID, or Guid.CreateVersion7() on .NET 9 and later for a time-ordered one. This page is handy when you need values without writing code, such as for test data or config files.
Why does SQL Server show GUIDs in uppercase?
SQL Server tools display uniqueidentifier values in capitals. Case doesn't change the value, so tick Uppercase if you want them to match.
Can I get GUIDs with curly braces?
Yes. Tick Braces { } to wrap each GUID the way the Windows registry and Guid.ToString("B") write it.
Is it safe to use these GUIDs in production?
Yes. They come from the browser's cryptographically secure random number generator and are created on your device, never sent anywhere.