Number Base Converter

Convert any number between bases 2 to 36. The most common ones - binary, octal, decimal, hex - are listed as presets. If you're doing something less common, you can set a custom from/to base.

How to use

  1. Type the number you want to convert.
  2. Pick the base it's currently in and the base you want to convert to.
  3. Hit Convert. Common conversions like dec to hex are one click away with the preset buttons.

Computers operate in binary (base 2) internally but programmers often work in hexadecimal (base 16) because it maps cleanly: every 4 binary digits become one hex digit. Decimal (base 10) is what humans use. Octal (base 8) shows up in file permissions on Unix systems. Converting between them manually is error-prone; the calculator does it instantly for any input.

Binary to hex is a common need. 10110111 in binary: split into groups of 4 from the right - 1011 = B, 0111 = 7 - giving hex B7. Hex to decimal: each digit is multiplied by the corresponding power of 16. B7 = (11 x 16) + 7 = 183. The calculator handles up to base 36 (digits 0-9 then A-Z).

Frequently Asked Questions

Why does computer science use hexadecimal so much?

Hex (base 16) is compact and maps perfectly to binary - 1 hex digit = 4 binary bits. So a byte (8 bits) is always 2 hex digits. Colour codes in web design (like #FF5733), memory addresses, and machine-level debugging all use hex because it is much more readable than raw binary.

What is the difference between base 10 and base 2 representation of the same number?

The number itself does not change - only the way it is written. The decimal 10 is the binary 1010. Both refer to the same quantity: ten units. The base is just a notation system.

Can I convert negative numbers or fractions?

This converter handles positive integers. Negative numbers use two complement notation in binary. Fractional parts use repeated multiplication, which produces recurring digits in many bases (like 0.1 in decimal is a recurring binary fraction).

Number Base Converter - Binary, Hex, Octal, Decimal | ToolHaven