Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36. Works with very large numbers.

Decimal (base 10)
Hexadecimal (base 16)
Binary (base 2)
Octal (base 8)
Other base:

How to convert between number bases

Type a number into any box – decimal, hexadecimal, binary, octal or a base of your choice – and all the other boxes update instantly. Prefixes such as 0x, 0b and 0o, spaces and underscores are ignored, and negative numbers work too. There is no size limit: 100-digit numbers are converted exactly.

Number systems explained

  • Binary (base 2) uses only 0 and 1. It is how computers store everything.
  • Octal (base 8) uses digits 0–7. It appears in Unix file permissions such as chmod 755.
  • Decimal (base 10) is the everyday system with digits 0–9.
  • Hexadecimal (base 16) uses 0–9 and A–F. One hex digit is exactly 4 bits, so it is a compact way to write bytes, memory addresses and colors like #FF8800.
  • Base 36 uses all digits and letters, and is used for short IDs and URL shorteners.

Quick reference

DecimalBinaryHex
101010A
151111F
161 000010
100110 010064
2551111 1111FF
1024100 0000 0000400

FAQ

How do I convert hex to decimal by hand?

Multiply each digit by 16 raised to its position, counting from 0 on the right, and add the results. For example, 2F = 2 × 16 + 15 × 1 = 47.

How are negative numbers shown?

With a minus sign, for example −255 is -FF. Computers usually store negative numbers in two’s complement, which depends on the number of bits, so it is not shown here.