UUID to Bytes Converter
Convert UUID values to byte-array notation.
Overview
The UUID to bytes converter takes a standard UUID string and returns its 16-byte representation in several byte-array notations: hex pairs, comma-separated decimal, C/C++ literal, Java byte array, Python bytes literal, and big-endian or little-endian variants. Paste a UUID, get the exact byte sequence your code needs.
It is the right tool for engineers comparing a UUID's wire format against a binary database column, debugging GUID parsing differences between .NET and other languages (the .NET Guid swaps the first three groups to little-endian), and anyone building network protocols that carry UUIDs as raw bytes. A UUID byte converter saves time when the same UUID looks suspiciously different in two systems.
How it works
A UUID, defined in RFC 4122, is a 128-bit value usually displayed as five groups of hexadecimal digits: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. The M nibble encodes the version (1–8); the N nibble's top bits encode the variant (10xx for RFC 4122). The byte order is normally big-endian: the first hex pair is byte 0, the next is byte 1, and so on, ignoring the dashes.
Microsoft's GUID format complicates things: when serialised as bytes, the first three groups (4, 2, and 2 bytes) are written little-endian, while the last two groups stay big-endian. The tool shows both layouts side by side so you can pick whichever your downstream system expects.
Examples
UUID: 550e8400-e29b-41d4-a716-446655440000
Big-endian: 55 0e 84 00 e2 9b 41 d4 a7 16 44 66 55 44 00 00
LE (.NET): 00 84 0e 55 9b e2 d4 41 a7 16 44 66 55 44 00 00
UUID: urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
C array: { 0xf8, 0x1d, 0x4f, 0xae, 0x7d, 0xec, 0x11, 0xd0,
0xa7, 0x65, 0x00, 0xa0, 0xc9, 0x1e, 0x6b, 0xf6 }
Python: b'\xf8\x1d\x4f\xae\x7d\xec\x11\xd0\xa7\x65\x00\xa0\xc9\x1e\x6b\xf6'
UUID: 00000000-0000-0000-0000-000000000000 (nil UUID)
Bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FAQ
Why does .NET show the bytes in a different order?
System.Guid.ToByteArray() uses Microsoft's historical mixed-endian layout, going back to GUIDs in COM and the early Windows API. Most other languages — Java, Python, Go, Postgres — serialise UUIDs in big-endian network byte order per RFC 4122.
How do I detect the version of a UUID?
The first hex digit of the third group (M above) is the version. 1 is time-based, 3 is MD5-namespaced, 4 is random, 5 is SHA-1-namespaced, 6 and 7 are time-ordered (RFC 9562), and 8 is custom.
Is the nil UUID a real value?
It is the all-zeros UUID 00000000-0000-0000-0000-000000000000, reserved by RFC 4122 as a sentinel for "no UUID". Treat it as a placeholder, not a real identifier.
Are URN-formatted UUIDs supported?
Yes. The tool accepts urn:uuid: prefixed values, braces, and bare hex (32 chars without dashes). All produce the same byte output.