Numbers · base 16Hexadecimal numbers
Convert a number to hex and back. Type a value in any base — you get the others, a digit-by-digit breakdown and the nibbles every digit unfolds into.
Convert
type a number in any baseDigit lanes
step the digits with the arrows — the number changes as you goEvery digit is a value multiplied by a power of sixteen; the sum of those products is the number. Under each digit is its nibble: the four bits it unfolds into with no arithmetic. That is why hex and binary convert digit by digit.
Bytes and colour
two hex digits make one byteOne byte is two hex digits. Next to it you see the value in decimal and in bits.
Hex becomes a colour when it has three, six or eight digits — one byte per channel. Right now there are 2.
Loads #0000FF — the same number padded with zeros on the left.
Conversion table
click a row to load the valueAbout hexadecimal
Hexadecimal is for places where bits matter. One digit is exactly four bits, so a byte is always two digits and converting to binary needs no division: every digit simply unfolds into its nibble. Values from ten to fifteen are written as the letters A–F.
One digit is four bits
NibbleA byte is two digits
ByteThe letters A–F
DigitsNotation prefixes
SyntaxColours
In practiceWhere else you meet it
In practiceFrequently asked questions
Works with non-negative integers of any length. Fractional and negative values are not supported.