Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal instantly, with support for any custom base from 2 to 36. A free number base converter for programming.

How to Use

  1. Select source base

    Choose the base of the number you want to convert (2, 8, 10, 16, or custom).

  2. Enter the number

    Type the number using digits valid for the selected base.

  3. View results

    Click Convert to see the number in all major bases simultaneously.

What is a number base (numeral system)?

A number base (also called a radix or numeral system) defines how many symbols are grouped together before a digit carries over to the next position. The decimal (base 10) system we use every day relies on the ten digits 0 through 9 and carries over once it reaches 10.

Common number bases

  • Binary (base 2): uses only 0 and 1. It is the fundamental unit computers use to process data through the on/off states of electrical signals.
  • Octal (base 8): uses 0 to 7. It appears in Unix file permissions, such as 755.
  • Hexadecimal (base 16): uses 0 to 9 and A to F. By packing four bits into a single digit, it expresses color codes, memory addresses, and MAC addresses concisely.

The same quantity simply looks different from one base to another, yet its value stays the same. For example, the decimal number 255 is 11111111 in binary and FF in hexadecimal.

How the conversion works

This converter first turns the input into a decimal value and then re-expands it into the target base.

decimal = Σ (digit value × base^position)

For example, converting the binary number 1011 to decimal:

1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11

To convert a decimal number into another base, you take the remainders of repeated division by the target base and read them in reverse. 11 → hexadecimal: 11 = 0×16 + 11 → 11 is B → B. In the formula, the digit value is the figure in each position, and the position index increases by one starting from the rightmost digit (0).

Frequently Asked Questions

What is a number base (numeral system)?
A number base is a system for representing numbers. Decimal uses the ten digits 0-9, binary uses only 0 and 1, octal uses 0-7, and hexadecimal uses 0-9 and A-F. The value of each digit is determined by a power of the base.
Where is binary used?
Binary is the native language of computers. Since computers process data using the on (1) and off (0) states of electrical signals, all data is stored internally in binary. It is used directly in network subnet masks, bitwise operations, and permission settings.
Why is hexadecimal used so often in programming?
Hexadecimal can express four binary digits (4 bits) in a single character, so it represents memory addresses, color codes, MAC addresses, and byte data concisely. 0xFF is the same as binary 11111111.
How do I convert binary to decimal?
Multiply each digit by the corresponding power of 2 and add the results. For example, 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀. The rightmost position starts at 2⁰ (=1).
Where is octal actually used?
Octal is most commonly used to express file permissions in Unix and Linux. In chmod 755, the 7 compresses binary 111 (read, write, and execute all allowed) into a single digit. Octal expresses three binary digits in one character.
Can I convert decimals or negative numbers?
This converter handles only non-negative integers. The input must consist of digits valid for the selected base (0 and 1 for binary, 0-9 and A-F for hexadecimal), and it will not convert if invalid characters are included.
What values do A through F mean in hexadecimal?
Hexadecimal must represent 0 to 15 in a single character, so 10 to 15 are replaced by the letters A to F. A=10, B=11, C=12, D=13, E=14, F=15. Therefore FF equals 15×16 + 15 = 255.
2026 device specs

Related Calculators