Updated: 03/05/2023 by Computer Hope

Hex may refer to any of the following:

Black pool balls, each with a number 0 to 9 or letter A to F on them.

1. Alternatively called base-16 or hex, the hexadecimal numbering system uses combinations of 16 character digits to represent numbers. Hexadecimal uses all ten numbers in the decimal system (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) and letters A through F. The letters A through F represent decimal numbers 10 through 15, respectively. Each digit is equivalent to 4 binary digits (2^4 = 16). For example, "computer hope" in hexadecimal becomes "636f6d707574657220686f7065".

HTML color codes

Anyone who has designed a web page has encountered a hexadecimal value when doing colors. For example, to create red text, use the HTML (hypertext markup language) color code #FF0000, which translates to 255 red, 0 green, and 0 blue in hexadecimal. See our HTML color codes page for further information and a listing of popular colors and their hexadecimal values.

What are numbers with a "0x" prefix?

Numbers with a "0x" (zero and x) prefix indicate the number shown is a hexadecimal number. For example, "0xCD" is the decimal equivalent of "205." By having "0x" in front of "CD," the reader knows they're dealing with a hexadecimal number and not something else, like the CD (compact disc) acronym in this example.


When hexadecimal uses the "0x" prefix, "0x" indicates the type of number being represented. In other words, with "0xCD," the "CD" is the hexadecimal number, and "0x" is ignored.

Convert text into hexadecimal

Use the below convert tool to convert any text into hexadecimal.

2. A hex is also a screw head.

Base, Binary, Color terms, Decimal, Hex editor, Octal, xxd