Number Base Converter

Use this number base converter to convert non-negative whole numbers between binary, octal, decimal, hexadecimal, and any other base from 2 to 36. Select the source and target bases, enter a number, and get the converted value instantly.

Formula

A number with digits dₙ...d₂d₁d₀ in base b has the decimal value dₙ × bⁿ + ... + d₂ × b² + d₁ × b + d₀. The resulting value can then be represented using the digits available in the target base.

How It Works

The converter interprets the input according to its source base and then represents the same numerical value in the target base. For example, the decimal value 255 can be represented as 11111111 in binary, 377 in octal, or FF in hexadecimal.

Example

For example, 255 in decimal (base 10) is FF in hexadecimal (base 16), 377 in octal (base 8), and 11111111 in binary (base 2).

Frequently Asked Questions

What bases does this number base converter support?
The converter supports every whole-number base from 2 through 36, including binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16).
How do you convert decimal to binary?
Convert the decimal number to base 2 by repeatedly dividing by 2 and recording the remainders, then reading the remainders from last to first. This converter performs the conversion automatically.
How do you convert binary to decimal?
Multiply each binary digit by the corresponding power of 2 and add the results. For example, 1011 in binary equals 8 + 0 + 2 + 1 = 11 in decimal.
How do you convert decimal to hexadecimal?
Convert the decimal value to base 16. Hexadecimal uses the digits 0–9 and the letters A–F for values 10–15.
What is 255 in hexadecimal?
255 in decimal is FF in hexadecimal.
What is 255 in binary?
255 in decimal is 11111111 in binary.
What is the difference between binary, decimal, octal, and hexadecimal?
They are different positional number systems. Binary uses base 2, octal uses base 8, decimal uses base 10, and hexadecimal uses base 16.
Can this converter handle bases other than binary, decimal, octal, and hexadecimal?
Yes. Any whole-number base from 2 to 36 is supported. Bases above 10 use letters A–Z as additional digit symbols.
Does this converter support negative numbers or decimals?
No. This converter is designed for non-negative whole numbers only.