How many characters are there in a GUID?

Jim Counts picture Jim Counts · Mar 3, 2009 · Viewed 87.1k times · Source

Using ASCII encoding, how many characters are there in a GUID?

I'm interested in the Microsoft style, which includes the curly brackets and dashes.

Answer

Adam Davis picture Adam Davis · Mar 3, 2009

From MSDN:

A GUID is a 128-bit value consisting of one group of 8 hexadecimal digits, followed by three groups of 4 hexadecimal digits each, followed by one group of 12 hexadecimal digits. The following example GUID shows the groupings of hexadecimal digits in a GUID: 6B29FC40-CA47-1067-B31D-00DD010662DA

From Wikipedia:

Often braces are added to enclose the above format, as such:

{3F2504E0-4F89-11D3-9A0C-0305E82C3301}

So a total of 38 characters in the typical hexadecimal encoding with curly braces.

-Adam