Developer Tool

Number Base Converter

Convert whole numbers between decimal, binary, hexadecimal and octal, and see all three common forms at once.

Maintained by Kumara Samigari LokeshMethod: exact big-integer conversionMethods and limitations

What this tool does

Enter a whole number, choose the base it is written in and the base you want. The tool shows the converted value plus the decimal, binary and hexadecimal forms. It uses exact big-integer arithmetic, so very long numbers convert without rounding. Negative numbers and a 0x prefix on hexadecimal input are accepted.

How place value works

In any base, each digit is multiplied by the base raised to its position, counting from 0 on the right.

Binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.

Hexadecimal uses digits 0–9 and A–F for 10–15: FF = 15×16 + 15 = 255.

Worked examples

  • Decimal 10 = binary 1010 = hex A = octal 12
  • Decimal 255 = binary 11111111 = hex FF
  • Hex 3459EC = decimal 3,430,892

Where you meet each base

  • Binary: how computers store data; subnet masks and bit flags.
  • Hexadecimal: colour codes (#3459EC), memory addresses, MAC addresses, hashes.
  • Octal: Unix file permissions, such as 755 meaning rwxr-xr-x.

Limitations

Whole numbers only; fractions and floating-point formats are not converted. Two’s complement representations of negative numbers are not shown; negatives keep a minus sign.

Common mistakes

  • Choosing the wrong source base, such as reading 10 as binary when it was decimal.
  • Using digits not valid for the base, such as 2 in binary or G in hex.

FAQs

How do I convert binary to decimal?

Multiply each digit by 2 to the power of its position from the right, and add.

Can it handle very large numbers?

Yes. It uses exact big-integer arithmetic.

Does it accept 0x for hex?

Yes.

Can it convert fractions?

No, whole numbers only.

Are letters case-sensitive?

No. a–f and A–F both work.