According to RFC 4122:
A UUID is 128 bits long, and can guarantee uniqueness across space and time.
But if we want to know the string representation, we need to check the ABNF:
UUID = time-low "-" time-mid "-"
time-high-and-version "-"
clock-seq-and-reserved
clock-seq-low "-" node
time-low = 4hexOctet
time-mid = 2hexOctet
time-high-and-version = 2hexOctet
clock-seq-and-reserved = hexOctet
clock-seq-low = hexOctet
node = 6hexOctet
hexOctet = hexDigit hexDigit
hexDigit =
"0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" /
"a" / "b" / "c" / "d" / "e" / "f" /
"A" / "B" / "C" / "D" / "E" / "F"
We have a total of 16 hexOctet. We count 2 characters by hexOctet plus 4 times the character "-". We have a total of 16 * 2 + 4 = 36 characters regardless of the version.