Number Base Converter

Convert numbers instantly between Binary, Decimal, Octal, and Hexadecimal.

Binary-
Octal-
Decimal-
Hexadecimal-
Advertisement
Advertisement

How to Use This Calculator

Type in the number you want to convert, then tell the calculator which base it's currently written in — Decimal, Binary, Octal, or Hexadecimal. Press "Convert" to instantly see that same value expressed in all four number systems.

Formula

Any number system works the same way: each digit position represents a power of the base. For example, in binary (base 2), the digits 1101 mean (1×2³) + (1×2²) + (0×2¹) + (1×2⁰) = 8 + 4 + 0 + 1 = 13 in decimal. This calculator first converts your input to a decimal integer, then re-expresses that integer in each of the other bases.

Worked Example

Enter 255 as a Decimal number. The calculator shows: Binary = 11111111, Octal = 377, Decimal = 255, Hexadecimal = FF. This is a commonly recognized value in programming because 255 is the maximum value a single byte (8 bits) can hold.

Where This Is Useful

Number base conversion is a everyday tool for programmers and computer science students — hexadecimal is used constantly for color codes and memory addresses, binary underlies all digital logic, and octal occasionally appears in Unix file permissions. Being able to switch between them quickly saves time compared to converting by hand.

Frequently Asked Questions

What characters are valid for hexadecimal? Digits 0–9 plus letters A–F (case-insensitive), representing values 10 through 15.

What happens if I enter invalid characters for the chosen base? The calculator will alert you that the input doesn't match the selected base — for example, entering "2" while Binary is selected, since binary only allows 0 and 1.

Frequently Asked Questions

What number bases does this convert between?

Binary, octal, decimal, and hexadecimal commonly.

Why is hex commonly used in computing?

Each hex digit represents 4 binary bits, making it a compact readable format.

How do you convert decimal to binary?

Repeatedly divide by 2, recording remainders, then read them in reverse order.

Suggest a Calculator

👋 We noticed you might be using an ad blocker. This site is free thanks to ads — consider allowing them here to support us. Thanks!