Hexadecimal Converter
Hexadecimal is the language computers use to write numbers compactly, and converting between everyday decimal and hex comes up constantly when you work with color codes, memory addresses or byte values. This converter takes a decimal whole number and shows it in three computing bases at once: hexadecimal, binary and octal. You enter a number in base 10, and it returns the equivalent in base 16, base 2 and base 8. The method behind each is repeated division by the target base, keeping the remainders and reading them from last to first, where hexadecimal uses the digits 0 through 9 and then A through F for the values 10 through 15. Hexadecimal earns its place in computing because each hex digit maps onto exactly four binary bits, so a long, error-prone binary string collapses into a short hex one. That is why the converter shows the binary form next to the hex, making the four-bits-per-digit relationship easy to see: the byte value 255 is FF in hex and 11111111 in binary. The tool handles non-negative whole numbers, which covers the common cases of bytes and addresses. Every result here is computed deterministically from your input, and the worked example below reconciles exactly to the converter.
Convert by repeatedly dividing by the base and reading the remainders, using A to F for 10 to 15 in hex. Decimal 255 is FF in hexadecimal, 11111111 in binary and 377 in octal.
Hexadecimal conversion method
divide the number by 16 repeatedly
record each remainder (0 to 15)
map 10 to 15 as A to F
read the remainders last to first
Each division by 16 peels off one hex digit as the remainder. Reading the remainders in reverse order spells out the hexadecimal number. The same method with base 2 or base 8 gives binary or octal.
Worked example
Convert decimal 255 to hexadecimal.
- 255 divided by 16 = 15 remainder 15
- 15 divided by 16 = 0 remainder 15
- Map remainders: 15 is F, 15 is F
- Read last to first: FF
Decimal 255 is FF in hexadecimal, which is 11111111 in binary. These are the converter's default inputs, so the result above matches the widget exactly.
Common values across bases
| Decimal | Hex | Binary |
|---|---|---|
| 10 | A | 1010 |
| 16 | 10 | 10000 |
| 100 | 64 | 1100100 |
| 255 | FF | 11111111 |
Number representation and standards: US National Institute of Standards and Technology (NIST).
Hexadecimal converter: frequently asked questions
How do I convert a decimal number to hexadecimal?
Divide the number by 16 repeatedly, writing down each remainder, then read the remainders from last to first using digits 0 to 9 and A to F. Decimal 255 divides into 15 remainder 15, and 15 is F, so 255 is FF in hexadecimal.
Why is hexadecimal used in computing?
Hexadecimal maps neatly onto binary, because each hex digit represents exactly four binary bits. That makes long binary strings far easier to read and write. Memory addresses, color codes and byte values are commonly shown in hex for this reason.
What do the letters A to F mean in hex?
Hexadecimal is base 16, so it needs 16 single-digit symbols. After 0 through 9 it uses A for 10, B for 11, C for 12, D for 13, E for 14 and F for 15. So the hex digit F is the decimal value 15.
How does binary relate to the hex result?
Each hexadecimal digit equals four binary digits. F is 1111 and another F is 1111, so FF is 11111111 in binary, which is decimal 255, the largest value a single byte can hold. The calculator shows the binary form alongside the hex.
Can this convert fractions or negative numbers?
This converter is built for non-negative whole numbers, which covers most computing uses such as bytes and addresses. Fractions and signed numbers use additional conventions like two's complement or fixed-point notation that are beyond a simple base conversion.
Official sources
- Number representation, data and computing standards: US National Institute of Standards and Technology (NIST). As at 25 June 2026.
Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.