Toolhaus

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal.

Enter a number in any base and instantly see it in binary, octal, decimal and hexadecimal. Uses big-integer maths so very large values stay exact. Handy for programming, networking and low-level debugging. Runs in your browser.

Binary
11111111
Octal
377
Decimal
255
Hexadecimal
ff

Type a number into the Value field, then choose the base it is currently written in — binary, octal, decimal or hexadecimal — from the From base menu. The tool immediately recalculates and displays the equivalent value in all four bases below, so you can compare them side by side or copy any one of them.

Common mistakes

  • Entering a digit that doesn't exist in the selected base, such as an 8 or 9 while Octal is chosen, or a letter past F while Hexadecimal is chosen — this triggers the invalid-number message.
  • Adding a decimal point or fraction, like 3.14 — the converter only works with whole numbers, so any fractional part makes the input invalid.
  • Expecting negative numbers to appear as two's-complement bit patterns — this tool just prepends a minus sign to the converted magnitude (e.g. -255 becomes -11111111 in binary), it does not simulate fixed-width signed binary.

Frequently asked questions

Does it handle very large numbers?

Yes. It uses BigInt internally, so large values convert exactly without rounding.

Why does it say my input is invalid?

The number you typed contains a digit that doesn't exist in the base you selected — for example an 8 while Octal is active, or a g while Hexadecimal is active. Switch the From base or fix the digit to clear the message.

Can I convert negative numbers?

Yes. Type a leading minus sign and the tool converts the magnitude, then adds the sign back in every base (e.g. -255 in decimal becomes -11111111 in binary and -ff in hex). It does not use two's-complement encoding.

Can I convert decimals or fractions?

No. The converter only supports whole (integer) values in each base; a decimal point makes the input invalid.

Is the hexadecimal output uppercase or lowercase?

Always lowercase (a–f). You can type hex digits in either case and the tool will accept them, but results are shown in lowercase.

Privacy

All processing happens locally in your browser. Your data is never uploaded.

Read the practical guide for this category.

Related tools