Tabwrench tools Small tools that run in your browser. No sign-up, no upload.
Tools / Generate / convert / Number base converter

Number base converter

Type a number in any common base and see it in binary, octal, decimal and hex together. Numbers can be as long as you like.

Runs in your browser. Nothing you paste leaves this page.
Examples:

The four bases side by side

DecimalBinaryOctalHex
0000000
7011177
81000108
10101012A
15111117F
161 00002010
2551111 1111377FF
65,5351111 1111 1111 1111177777FFFF

One hex digit is exactly four binary digits, which is why the binary output is shown in groups of four. One octal digit is three binary digits.

How the input is read

  • With “Detect”, a number starting with 0x is hex, 0b is binary and 0o is octal. A number containing the letters A to F is read as hex. Anything else is decimal.
  • Choose the input base yourself when the digits are ambiguous. 1010 is ten in binary and one thousand and ten in decimal.
  • Spaces, commas and underscores are ignored, so 1111_0000 and 1,000,000 both work.

Questions

Is there a size limit?

No practical one. The page uses arbitrary-precision integers, so a 64-bit value such as 18,446,744,073,709,551,615 or a 256-bit hash converts exactly.

How are negative numbers shown?

With a minus sign in every base. Two's-complement bit patterns depend on a fixed width, which this page does not assume.

Does it convert fractions?

No, whole numbers only.

Related tools