The same thing, two names
UUID stands for Universally Unique Identifier. GUID stands for Globally Unique Identifier. Both refer to the same 128-bit identifier format, defined today by RFC 9562.
Microsoft introduced the term GUID in the early 1990s as part of COM (Component Object Model), the Windows technology for inter-process communication. COM needed a way to identify interfaces and objects across processes and machines without a central registry — exactly the problem UUIDs solve. Microsoft adopted the UUID standard from the Open Software Foundation (OSF) and called it GUID in their documentation and APIs. The name stuck across the entire Microsoft ecosystem: .NET, SQL Server, Azure, and Windows APIs all say GUID.
Outside Microsoft’s ecosystem — Linux, macOS, PostgreSQL, MySQL, JavaScript, Python, Go, Rust — the term UUID is universal.
Format: identical
Both are 128 bits written as 32 hexadecimal digits in five groups:
550e8400-e29b-41d4-a716-446655440000
8 - 4 - 4 - 4 - 12
The version nibble (first digit of the third group) and variant bits (first digit of the fourth group) follow exactly the same RFC 9562 rules in both.
Where they diverge: SQL Server’s byte order
The one practical difference is how SQL Server stores and sorts uniqueidentifier values.
Standard UUIDs are stored in big-endian byte order — the most significant byte first, matching the visual string representation. SQL Server uses a mixed byte order for its uniqueidentifier type: the first three groups are stored in little-endian order, and only the last two groups are big-endian.
This means a UUID v7 — which is designed to sort chronologically — does not sort correctly as a SQL Server uniqueidentifier. The timestamp bytes are in the wrong positions after SQL Server’s internal reordering.
-- Standard UUID v7 — sorts correctly in PostgreSQL, MySQL, SQLite
018f3c4e-7a21-7b3c-9d4e-5f6a7b8c9d0e
-- SQL Server uniqueidentifier — byte order rearranges the sort
-- Use NEWSEQUENTIALID() for sequential inserts in SQL Server
The practical rule for SQL Server:
- Use
NEWID()to generate a random GUID (equivalent to UUID v4). - Use
NEWSEQUENTIALID()to generate a sequential GUID optimised for SQL Server’s sort order. Do not use UUID v7 directly as a clustered index key in SQL Server without a byte-swap transformation. - If you generate UUIDs externally and insert them, the values are valid and stored correctly — they just do not sort chronologically as
uniqueidentifier.
.NET and C#
.NET has a built-in Guid type (note: Guid, not UUID):
// Generate a random GUID (equivalent to UUID v4)
Guid id = Guid.NewGuid();
Console.WriteLine(id); // 550e8400-e29b-41d4-a716-446655440000
// Parse from string
Guid parsed = Guid.Parse("550e8400-e29b-41d4-a716-446655440000");
// Convert to string — default includes hyphens
string s = id.ToString(); // "550e8400-e29b-41d4-a716-446655440000"
string n = id.ToString("N"); // "550e8400e29b41d4a716446655440000" (no hyphens)
.NET 9 added Guid.CreateVersion7() for time-ordered GUIDs:
// .NET 9+
Guid v7 = Guid.CreateVersion7();
For earlier .NET versions, use the UUIDNext NuGet package or generate v7 values in application code.
PostgreSQL: UUID, not GUID
PostgreSQL uses the term uuid (lowercase) for both the column type and functions:
-- Native uuid type — 16 bytes, bitwise comparison
CREATE TABLE users (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
name text NOT NULL
);
-- PostgreSQL 18+: native v7
CREATE TABLE events (
id uuid DEFAULT uuidv7() PRIMARY KEY,
name text NOT NULL
);
PostgreSQL does not use the term GUID anywhere in its documentation or SQL dialect. Values stored as uuid are standard RFC 9562 UUIDs in big-endian byte order and sort correctly for v7.
When the term matters
In code and communication, use the term your platform uses:
| Platform | Term | Type / API |
|---|---|---|
| .NET / C# | GUID | System.Guid |
| SQL Server | GUID | uniqueidentifier |
| PostgreSQL | UUID | uuid column type |
| MySQL / MariaDB | UUID | BINARY(16) or string |
| JavaScript | UUID | crypto.randomUUID() |
| Python | UUID | uuid module |
| Go | UUID | github.com/google/uuid |
| Java | UUID | java.util.UUID |
The underlying value is always the same 128-bit number. The term is just convention.
Summary
- UUID and GUID are the same standard — 128 bits, same format, same RFC.
- GUID is Microsoft’s name; UUID is used everywhere else.
- The one real difference is SQL Server’s internal byte storage order for
uniqueidentifier, which affects sort behaviour for sequential GUIDs. - Use the term that matches your platform. Do not mix them in the same codebase without a comment explaining why.
To generate a UUID now, use the UUID v7 generator or UUID v4 generator. For a deeper look at UUID versions, see UUID versions explained.
Frequently asked questions
Is a GUID the same as a UUID?
Yes, in practice. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit identifier standard defined by RFC 9562. The terms are interchangeable in most contexts.
Does SQL Server use GUIDs or UUIDs?
SQL Server uses the term GUID and stores them in the uniqueidentifier column type (16 bytes). The values are compatible with standard UUIDs but SQL Server's internal byte order differs, which means UUID v7 does not sort chronologically as a uniqueidentifier without a byte-swap transformation.
What column type should I use to store a UUID in a database?
Use the native type where one exists — uuid in PostgreSQL, uniqueidentifier in SQL Server. In MySQL use BINARY(16) and store raw bytes. Avoid VARCHAR(36): it costs 36 bytes per row versus 16 for binary and makes every comparison a string operation.
Is a GUID the same as a UUID?
Yes, in practice. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit identifier standard. Both follow the same format and the same RFC 9562 specification. The terms are interchangeable in most contexts.
What does GUID stand for?
GUID stands for Globally Unique Identifier. Microsoft introduced the term as part of COM (Component Object Model) in the 1990s. It is the same concept as a UUID — a 128-bit value designed to be unique without central coordination.
Does SQL Server use GUIDs or UUIDs?
SQL Server uses the term GUID and stores them in the uniqueidentifier column type (16 bytes). The values are compatible with standard UUIDs — the same 128-bit format — but SQL Server's byte storage order differs, which affects how they sort. NEWSEQUENTIALID() produces sequential GUIDs optimised for SQL Server's sort order.
Should I use GUID or UUID in my code?
Use whichever term matches your platform convention. .NET and SQL Server use GUID. Everything else — PostgreSQL, MySQL, JavaScript, Python, Go — uses UUID. The underlying value is the same 128-bit number either way.