- Home
- Tech & Screens
- Number Base Converter
Number Base Converter
Convert a whole number between binary, octal, decimal and hexadecimal. Type the number, say which base it is in and which you want, and all four representations are shown together. Very long values are handled exactly.
- Binary
- 11111111
- Octal
- 377
- Decimal
- 255
- Hexadecimal
- FF
- Bits needed
- 8
Saved setups
Save a set of inputs you reuse — your usual rate, your loan, your room sizes — and load it back in one tap.
Your recent calculations
Results you calculate here are kept on this device so you can come back to them.
Formula
How to use it
- Type the number. Spaces and a 0x, 0b or 0o prefix are ignored.
- Choose the base it is written in.
- Choose the base to convert to; the other bases are listed below the result.
Worked examples
Decimal 255 to binary
- Result
- 11111111
- Hexadecimal
- FF
- Octal
- 377
- Bits needed
- 8
Binary 1011 0110 to decimal: 128 + 32 + 16 + 4 + 2
- Result
- 182
- Hexadecimal
- B6
- Octal
- 266
Hexadecimal 0x1F4 to decimal: 1 × 256 + 15 × 16 + 4
- Result
- 500
- Binary
- 111110100
- Octal
- 764
- Bits needed
- 9
The four bases
Binary (base 2) uses 0 and 1 and is how computers store everything. Octal (base 8) uses 0–7 and survives mainly in Unix file permissions such as 755. Decimal (base 10) is everyday counting. Hexadecimal (base 16) uses 0–9 and A–F, where A is 10 and F is 15, and is the compact way to write bytes, memory addresses and colors.
Converting by hand
To read binary, add the place values of the 1s: 1011 0110 is 128 + 32 + 16 + 4 + 2 = 182. Hex and binary convert digit by digit, because each hex digit stands for exactly four bits: B is 1011 and 6 is 0110, so 1011 0110 is B6.
Questions people ask
What is 255 in binary?
11111111 — eight 1s, the largest value that fits in one byte. In hexadecimal it is FF.
What is FF in decimal?
255: 15 × 16 + 15.
Does it convert fractions or negative numbers?
Negative whole numbers are shown with a minus sign rather than in two’s complement. Fractions are not supported.
Keep exploring
Goes well with
- Tech & ScreensIP Subnet CalculatorNetwork, broadcast, host range and mask for an IPv4 subnet.
- MathScientific Notation ConverterConvert numbers to and from scientific, E and engineering notation.
- MathExponent CalculatorRaise any base to any power — negative and fractional exponents too.
- MathLogarithm CalculatorLog of a number in base 10, e, 2 or any base you choose.
- MathRoman Numeral ConverterConvert numbers to Roman numerals and back, 1 to 3,999.
- Everyday LifeGematria CalculatorEnglish ordinal, reduction, reverse, Jewish and Hebrew gematria values of any text.
More in Tech & Screens
- File Size Calculator
- LED Resistor Calculator
- Password Entropy Calculator
- Resistor Color Code Calculator
- Bandwidth Calculator
- Uptime Calculator
- Aspect Ratio Calculator
- Battery Life Calculator