255
255
FF
255 ÷ 16 = 15 remainder 15, then 15 ÷ 16 = 0 remainder 15. Both remainders are F.
Type a whole number and read it in hexadecimal, with each division by 16 shown underneath. It opens on 255, which is FF.
Last updated
Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.
Each division by 16 leaves a remainder from 0 to 15, and that remainder is the next hex digit from the right. For 500: 500 ÷ 16 = 31 remainder 4, 31 ÷ 16 = 1 remainder 15 (F) and 1 ÷ 16 = 0 remainder 1. Read upward, that is 1F4.
If you already have the binary form, there is a shortcut: split the bits into groups of four from the right and turn each group into one hex digit. The binary to hex converter shows that method.
The converter writes out the division steps for any whole number and uses BigInt, so 64-bit values stay exact.
255
FF
255 ÷ 16 = 15 remainder 15, then 15 ÷ 16 = 0 remainder 15. Both remainders are F.
rgb(255, 136, 0)
#FF8800
Convert each channel on its own: 255 is FF, 136 is 88 and 0 is 00.
500
1F4
The remainders are 4, 15 and 1. Read upward, with 15 written as F, they give 1F4.
128512
1F600
128512 is the code point of the grinning face emoji, written U+1F600.
0x10 is 16, so mark hex values with a 0x prefix.hex(255) returns '0xff' and format(255, 'X') returns 'FF'. In JavaScript, (255).toString(16) returns 'ff'.