Number Base Converter

Enter a whole number in decimal.

A whole number from 0 up. Binary and hex input is not accepted, only decimal.

This result is an estimate only. Double-check important figures before relying on them.

How it is calculated

  • The number is written in base 2, 8, 16 and 32 using repeated division
  • Hex digits above 9 are A to F
  • Bits needed = the length of the binary form

For negative numbers, use the two’s complement calculator.

Worked example

255 in decimal:

  • Binary 11111111
  • Octal 377
  • Hex FF

Why your number may differ

Only whole numbers up to 2⁵³ − 1 are supported, so very large values need a bigger tool.

Frequently asked questions

How do I convert decimal to binary?

Divide by 2 repeatedly and write the remainders from last to first. 13 gives 1101.

How do I convert decimal to hex?

Divide by 16 and use the letters A to F for remainders 10 to 15. 255 gives FF.

Why do programmers use hex?

One hex digit stands for exactly four bits, so hex is a short way to write binary values such as colours (#FF0000) and memory addresses.