Decimal to Hex Converter
Type a decimal number and get its hexadecimal value, plus binary and octal.
- Decimal
- Hex
- Binary
- Octal
Click a bit to flip it.
How to convert decimal to hex
To convert a decimal number to hex, divide it by 16 repeatedly and read the remainders from last to first. Remainders 10 to 15 are written A to F.
Worked example
Convert 6719: 6719 ÷ 16 = 419 remainder 15 (F); 419 ÷ 16 = 26 remainder 3; 26 ÷ 16 = 1 remainder 10 (A); 1 ÷ 16 = 0 remainder 1. Reading upward gives 1A3F.
Negative numbers
Negative values are shown in two's complement at the chosen word size. For example -1 is FF at 8 bits and FFFFFFFF at 32 bits. Tick Signed to keep the decimal column negative.
Other conversions
- Hex to decimal · Decimal to hex
- Binary to decimal · Decimal to binary
- Hex to binary · Binary to hex
- Full programmer calculator with bitwise operations, floats and timestamps