Number Base Converter

Convert binary, octal, decimal, hex.

About the Number Base Converter

Four linked fields for binary, octal, decimal, and hexadecimal. Type in any one of them and the other three update on every keystroke, so you can read a hex bitmask as binary or check what an octal file mode comes to in decimal without reaching for a calculator. Values are held as arbitrary-precision integers, so a 128-bit hex value converts exactly rather than losing digits to floating point.

How to use the Number Base Converter

  1. Type or paste your value into the field for the base you already have: Binary, Octal, Decimal, or Hexadecimal.
  2. Read the other three fields, which convert as you type.
  3. Press the copy button beside the field you need.

Frequently asked questions

How large a number can it handle?
There is no practical limit. Conversion uses JavaScript BigInt rather than the 64-bit float parseInt relies on, so values well past 2^53 keep every digit.
Should I include the 0x or 0b prefix?
No, enter the digits only. An x is not a hexadecimal digit, so 0x1F is rejected while 1F converts fine.
Does it accept negative numbers?
Yes. A leading minus sign is honoured and carried through to all four bases.
Is the hex output upper or lower case?
Upper case, as in FF. Input is accepted in either case.
Why was my value rejected?
One character is not a digit in that base, and the message names it. Typing a 9 into the Octal field is the usual cause, since octal only runs from 0 to 7.

Related tools