What is GUID?

GUID (Globally Unique Identifier) is Microsoft's implementation of the UUID standard, a 128-bit identifier used to uniquely identify information in computer systems. GUIDs and UUIDs are essentially the same thing with different names.

Quick Facts

Full NameGlobally Unique Identifier
Created1990s by Microsoft (based on UUID standard)
SpecificationOfficial Specification

How GUID Works

GUID is the term used primarily in Microsoft technologies (Windows, .NET, COM, SQL Server), while UUID is the standard term used elsewhere. Both follow the same format: 32 hexadecimal digits displayed as 8-4-4-4-12. GUIDs are generated using algorithms that ensure uniqueness without requiring a central authority. In .NET, the Guid struct provides methods for creating and manipulating GUIDs. SQL Server has the uniqueidentifier data type for storing GUIDs.

Key Characteristics

  • 128-bit identifier, same as UUID
  • Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • Microsoft terminology for UUID
  • Used extensively in Windows and .NET
  • COM components identified by GUIDs (CLSID, IID)
  • SQL Server uniqueidentifier type

Common Use Cases

  1. COM component identification (CLSID)
  2. Windows Registry keys
  3. .NET application identifiers
  4. SQL Server primary keys
  5. Active Directory object identifiers

Example

// C# GUID examples
Guid newGuid = Guid.NewGuid();
// Output: 3f2504e0-4f89-11d3-9a0c-0305e82c3301

Guid parsedGuid = Guid.Parse("3f2504e0-4f89-11d3-9a0c-0305e82c3301");

// SQL Server
-- DECLARE @id uniqueidentifier = NEWID()
-- SELECT @id
-- Result: 6F9619FF-8B86-D011-B42D-00C04FC964FF

Related Tools on QubitTool

Related Concepts