Number Base Converter
Convert any whole number between binary, octal, decimal and hex, with the working shown.
Runs in your browser — nothing is uploaded
Spaces and underscores are ignored. Prefixes like 0x, 0b and 0o are accepted. No size limit.
Results
Binary (base 2)
1111 1111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
8 bits · 1 byte (unsigned magnitude)
Decimal to binary: divide by 2 repeatedly
255 ÷ 2 = 127 remainder 1
127 ÷ 2 = 63 remainder 1
63 ÷ 2 = 31 remainder 1
31 ÷ 2 = 15 remainder 1
15 ÷ 2 = 7 remainder 1
7 ÷ 2 = 3 remainder 1
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Read the remainders from bottom to top: 11111111₂
How to use Number Base Converter
- 1
Choose the base of your number: Binary, Octal, Decimal or Hex.
- 2
Type or paste the number into the box; prefixes like 0x and spaces between groups are fine.
- 3
Read the value in all four bases at once and select Copy next to the one you need.
- 4
Check the working panel to see the place-value sum or the repeated division by 2.
About this tool
A number base is how many digits a system uses. Decimal uses ten (0–9), binary uses two (0 and 1), octal uses eight (0–7) and hexadecimal uses sixteen (0–9 then A–F for 10–15). Each digit is worth its value times the base raised to its position, counting from zero on the right, so 1011 in binary is 1×8 + 0×4 + 1×2 + 1×1 = 11.
The converter uses JavaScript BigInt arithmetic, so it stays exact for numbers of any length — a 64-bit value like FFFFFFFFFFFFFFFF converts to 18,446,744,073,709,551,615 without rounding. Ordinary calculators lose precision past about 16 decimal digits. It handles whole numbers, including negative ones written with a minus sign; it does not convert fractions or two's-complement bit patterns.
Hex is popular because each hex digit maps to exactly four binary digits, which is why the binary output is grouped in fours. Octal maps to three bits per digit and still appears in Unix file permissions such as 755. Everything is computed in your browser, so nothing you type leaves your device.
Questions people ask
How do I convert binary to decimal?
Multiply each bit by its place value (1, 2, 4, 8, 16… from the right) and add the results. For example, 110101 = 32 + 16 + 4 + 1 = 53.
How do I convert decimal to binary?
Divide by 2 repeatedly and write down each remainder, then read the remainders from bottom to top. For example, 13 gives remainders 1, 0, 1, 1, so 13 is 1101 in binary.
What is FF in decimal?
FF in hexadecimal is 255: F is 15, so 15 × 16 + 15 = 255. It is the largest value a single byte can hold.
Is there a size limit?
No practical one. The converter uses arbitrary-precision integers, so numbers with hundreds of digits convert exactly.
Related tools
- Roman Numeral ConverterTurn numbers into Roman numerals and back, with each step explained.
- Data Storage ConverterConvert file and drive sizes, with decimal (1000) and binary (1024) units labeled.
- Rounding CalculatorRound a number to decimal places, significant figures or the nearest 10, 100 or 0.5.
- Length ConverterConvert between metric and imperial lengths, with the formula and a quick chart.
- Weight ConverterConvert kilograms, pounds, ounces, grams and stone, with the formula and a quick chart.
- Temperature ConverterConvert between °C, °F and K, with the formula and the working shown.