In mathematics and computing, the hexadecimal (also base 16 or hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16.
Unlike the common way of representing numbers using 10 symbols, hexadecimal uses 16 distinct symbols, most often the symbols "0"-"9" to represent values 0 to 9, and "A"-"F" (or alternatively "a"-"f") to represent values 10 to 15.
Hexadecimal is used in the transfer encoding Base16,
in which each byte of the plaintext is broken into two 4-bit values and represented by two hexadecimal digits.
Advantages of Hex encoding -
Most programming languages already have facilities to parse ASCII-encoded hexadecimal
Being exactly half a byte, 4-bits is easier to process than the 5 or 6 bits of Base32 and Base64 respectively
The symbols 0-9 and A-F are universal in hexadecimal notation, so it is easily understood at a glance without needing to rely on a symbol lookup table
Many CPU architectures have dedicated instructions that allow access to a half-byte (otherwise known as a "nibble"), making it more efficient in hardware than Base32 and Base64