Skip to content
Conversion

Binary / Number Base Converter

Convert numbers between binary, decimal, hexadecimal, and octal. All bases displayed simultaneously with bit length.

Enter a number and select its base

How is this calculated?

Formula: Parse input from source base, then convert to all target bases.

Step 1: Parse input to decimal
  decimal = parseInt(input, fromBase)

Step 2: Convert decimal to all bases
  binary  = decimal.toString(2)
  hex     = decimal.toString(16).toUpperCase()
  octal   = decimal.toString(8)

Bit Length:
  bits = binary.length
  (minimum bits needed to represent the number)

Example: "FF" (hex) → 255 (dec) → 11111111 (bin) → 377 (oct)
Bit length: 8
Conversion history

No conversions yet.

FAQ

Frequently asked questions

What is binary code?
Binary is a base-2 numeral system used by computers, representing data using only two symbols: 0 and 1.
How is text converted to binary?
Each letter or character is mapped to a specific number (usually using ASCII or Unicode), which is then converted into an 8-bit binary string.
Why is my binary output so long?
Every single character (including spaces and punctuation) requires 8 binary digits (bits). A short sentence produces a lot of binary code.
Can I convert numbers to binary?
Yes, decimal numbers can be converted directly into their base-2 binary equivalents.
What does '01101000 01101001' mean?
In standard ASCII binary, that sequence translates to the word 'hi'.

Related tools