Hex Digit

Unicode Version 18.0

Hex Digit is a binary character property that identifies characters used in hexadecimal notation, namely the ASCII digits 0 through 9 and the letters A through F (both uppercase and lowercase). This property simplifies parsing and validating hexadecimal strings in programming contexts, as it covers only the standard 22 characters and excludes fullwidth variants or other scripts. Its main function is to aid in lexical analysis, allowing software to quickly determine if a character can contribute to a base-16 numeric value. The property is often paired with a related ASCII Hex Digit property, which explicitly restricts matches to ASCII characters, whereas the standard version may, in some implementations, also include fullwidth forms. However, in current Unicode data, the Hex Digit property is defined exclusively for the 22 basic Latin characters, ensuring consistent behavior across applications that rely on it for formatting, encoding, or color codes.