GUID Generator
GUID: Microsoft's standard format for UUIDs (v4), uppercase and enclosed in braces. Used widely in Windows and .NET.
What is a GUID?
GUID (Globally Unique Identifier) is Microsoftβs implementation of the UUID standard.
Itβs widely used in Windows, .NET, SQL Server, COM, and distributed systems.
π’GUIDs are 128-bit numbers shown as 32 hex digits in 5 groups, separated by hyphens and enclosed in braces.
Example:
Example:
{D34DB33F-0000-0000-0000-1234567890AB}
- β¨ Guaranteed uniqueness across machines, time, and space
- π Used for database keys, tokens, file IDs, object references, and sessions
- β οΈ Practically zero chance of accidental collision
- π₯οΈ Format: Uppercase, curly braces, 5 groups, RFC 4122-compliant
β¨οΈGenerate GUID in Code
βοΈ Java
// Java
import java.util.UUID;
System.out.println("{" + UUID.randomUUID().toString().toUpperCase() + "}");
#οΈβ£ C#
// C#
using System;
Console.WriteLine(Guid.NewGuid().ToString("B").ToUpper());
π PHP
// PHP (ramsey/uuid)
use Ramsey\Uuid\Uuid;
echo "{" . strtoupper(Uuid::uuid4()->toString()) . "}";
π Python
# Python
import uuid
print("{" + str(uuid.uuid4()).upper() + "}")
π΅ C
// C (libuuid, Linux)
#include <uuid/uuid.h>
uuid_t uuid;
char str[37];
uuid_generate_random(uuid);
uuid_unparse_upper(uuid, str);
printf("{%s}\n", str);