Decimal to Hex Converter

Convert decimal to hex with the divide-by-16 working shown.

How it works – step by step

Hex to decimal table (0–1024)
DecimalHexBinary
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
10A1010
11B1011
12C1100
13D1101
14E1110
15F1111
16100001 0000
17110001 0001
18120001 0010
19130001 0011
20140001 0100
21150001 0101
22160001 0110
23170001 0111
24180001 1000
25190001 1001
261A0001 1010
271B0001 1011
281C0001 1100
291D0001 1101
301E0001 1110
311F0001 1111
32200010 0000
50320011 0010
64400100 0000
100640110 0100
1277F0111 1111
128801000 0000
200C81100 1000
255FF1111 1111
2561000001 0000 0000
5122000010 0000 0000
10003E80011 1110 1000
10244000100 0000 0000

How to use the Decimal to Hex Converter

  1. Type a decimal number.
  2. Read the hex result and copy it.
  3. Follow the divide by 16 table to see each remainder become a hex digit.
  4. Use the swap button to convert hex back to decimal.

About this tool

Convert decimal to hex and see every step of the working. Type a number such as 255, 4096 or 65535 and the hexadecimal value appears immediately – FF, 1000 and FFFF – with a table showing each division by 16 and its remainder.

To convert decimal to hexadecimal by hand, divide the number by 16 and write down the remainder. Divide the quotient by 16 again and repeat until you reach 0. The remainders, read from the bottom up, are the hex digits – with 10 to 15 written as A to F. For example, 419 ÷ 16 = 26 r 3, 26 ÷ 16 = 1 r 10 (A), 1 ÷ 16 = 0 r 1, so 419 is 1A3.

This is base 10 to base 16 conversion, which programmers need for colour codes, memory addresses, permissions and byte values. The converter also gives you the binary value, works with negative numbers and decimal fractions, and converts numbers far bigger than an ordinary calculator can handle without losing a digit. A reference table lists common values from 0 to 1024. To reverse the conversion, use Hex to Decimal.

Frequently asked questions

Divide by 16 and write down the remainder, then divide the quotient by 16 and repeat until it is 0. Read the remainders from bottom to top, writing 10–15 as A–F.

255 = 15 × 16 + 15, so it is FF in hex. 256 is 100, 4095 is FFF and 65,535 is FFFF.

Convert each of the three numbers to two hex digits and join them: RGB(255, 136, 0) → FF 88 00 → #FF8800.

Decimal is base 10 (digits 0–9). Hexadecimal is base 16 (digits 0–9 and A–F). One hex digit is exactly four binary bits.

Yes – the result keeps the minus sign, for example −255 is −FF.