Micru Logo

UUID Format Converter

Convert a UUID between hyphenated, no-hyphens, URN, Base64, GUID, and language-specific formats. Accepts any common UUID representation as input.

UUID Representations Explained

A UUID is fundamentally a 128-bit number. That number can be serialised into text or binary in many ways, and different ecosystems have different conventions. Knowing which format to use - and when to convert - prevents subtle bugs and data corruption when UUIDs cross system boundaries.

Format Reference

Standard Hyphenated

8-4-4-4-12

The canonical form defined in RFC 4122. Lowercase hex with four hyphens separating five groups. Universally accepted by databases, programming languages, and APIs. Use this as the default unless you have a specific reason to use another format.

No Hyphens

32 hex chars

The same 32 hex characters without separators. Used in MySQL's UUID() function output when hyphens are stripped, in some legacy APIs, and when embedding UUIDs in environments that prohibit hyphens (e.g., certain config file parsers).

URN

urn:uuid:...

Uniform Resource Name form. Required in XML document type definitions, SOAP WS-Addressing headers, and some LDAP schema definitions. The urn:uuid: prefix is case-insensitive per RFC 4122.

Braces (Windows GUID)

{{uuid}})

Curly-brace-wrapped UUID string common in Windows Registry, COM/DCOM GUIDs, and .NET. The Guid.Parse() and Guid.ToString("B") methods produce and consume this format in C#.

Microsoft GUID (byte-swapped)

mixed-endian binary

SQL Server's uniqueidentifier type stores the first three UUID fields in little-endian byte order and the last two in big-endian. This matters when comparing UUIDs between SQL Server and systems that use standard big-endian byte order. The Guid structure in .NET on Windows uses this mixed-endian layout internally.

Base64 / Base64url

22 or 24 chars

RFC 4648 Base64 encoding of the 16-byte UUID produces 24 characters with == padding. URL-safe Base64 (using -_ instead of +/) without padding yields 22 characters, suitable for JWT claims, URL path segments, and compact storage in JSON.

Language-Specific Literals

Most languages and database drivers accept UUIDs as strings but have idiomatic constructor or literal forms:

C# / .NET

new Guid("...") or Guid.Parse("..."). The Guid struct accepts all common formats: hyphenated, no-hyphens, braces, and parentheses.

Java

UUID.fromString("...") requires the hyphenated format. UUID.randomUUID() generates a v4 UUID. JPA and Hibernate map java.util.UUID to database UUID columns automatically.

PostgreSQL

The ::uuid cast accepts the hyphenated string. gen_random_uuid() (PostgreSQL 13+) generates v4 UUIDs natively. UUID literals in SQL do not require quotes when cast explicitly.