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: {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);