UUID Format Converter
Paste a UUID in any common form, including Base64, to see it written every other way. Copy the one you need.
That is not a UUID. Paste 32 hex digits, with or without hyphens or braces, or a Base64 value.
- Standard (lowercase)
01a16818-85c0-7b3e-9f2a-4c6d81e05a73 - Uppercase
01A16818-85C0-7B3E-9F2A-4C6D81E05A73 - No hyphens (32 hex)
01a1681885c07b3e9f2a4c6d81e05a73 - Braces (Microsoft registry)
{01A16818-85C0-7B3E-9F2A-4C6D81E05A73} - URN
urn:uuid:01a16818-85c0-7b3e-9f2a-4c6d81e05a73 - Base64
AaFoGIXAez6fKkxtgeBacw== - Base64 URL-safe
AaFoGIXAez6fKkxtgeBacw - 128-bit integer
2167299103477905307014901641032784499 - Bytes (big-endian, RFC order)
[0x01, 0xa1, 0x68, 0x18, 0x85, 0xc0, 0x7b, 0x3e, 0x9f, 0x2a, 0x4c, 0x6d, 0x81, 0xe0, 0x5a, 0x73] - .NET Guid.ToByteArray() order
[0x18, 0x68, 0xa1, 0x01, 0xc0, 0x85, 0x3e, 0x7b, 0x9f, 0x2a, 0x4c, 0x6d, 0x81, 0xe0, 0x5a, 0x73] - Binary (128 bits)
00000001 10100001 01101000 00011000 10000101 11000000 01111011 00111110 10011111 00101010 01001100 01101101 10000001 11100000 01011010 01110011 - C#
new Guid("01a16818-85c0-7b3e-9f2a-4c6d81e05a73") - Java
UUID.fromString("01a16818-85c0-7b3e-9f2a-4c6d81e05a73") - MySQL BINARY(16)
UUID_TO_BIN('01a16818-85c0-7b3e-9f2a-4c6d81e05a73')
The formats, and where you meet them
| Format | Length | Where it is used |
|---|---|---|
| Standard | 36 | Almost everywhere: databases, APIs, logs |
| No hyphens | 32 | Compact storage, some file names |
| Braces | 38 | Windows registry, .NET, Visual Studio files |
| URN | 45 | XML and standards that need a URI |
| Base64 | 24 | JSON payloads and tokens |
| Base64 URL-safe | 22 | Short IDs in URLs |
| 16 bytes | 16 bytes | BINARY(16) columns and network protocols |
The GUID byte order catch
Written as text, a GUID and a UUID look the same. As bytes they can differ. .NET's Guid.ToByteArray() stores the first three groups little-endian, so the bytes of 01a16818 come out as 18 68 a1 01. The last two groups stay as written.
If an ID changes when it moves between .NET and another system, a byte order mix-up is the usual cause. Compare the two byte rows above to see exactly which bytes move. Read more in What is a GUID, and is it a UUID?
Questions people ask
Why is a UUID in Base64 shorter?
Base64 packs 6 bits into each character, where hex packs 4. So 128 bits need 22 characters instead of 32. The standard Base64 form adds two = signs as padding; the URL-safe form leaves them off.
Which byte order should I use?
The big-endian order, as written, unless you are reading or writing bytes with .NET. Guid.ToByteArray() and SQL Server store the first three groups the other way round.
Can I convert Base64 back to a UUID?
Yes. Paste a 22- or 24-character Base64 or Base64 URL-safe value and the converter reads it back.
Does converting change the UUID?
No. Every format here holds the same 128 bits. Only the way they are written changes.


