keisoku

Base-N Number Converter

Convert between binary, octal, decimal and hexadecimal, plus any base from 2 to 36. See your value listed in every common base at once.

Input

Input base
Output base (common values)

Result

Representation in Base 2 (binary)

11111111

Input: Base 10 (decimal) (decimal 255)

Base 2 (binary)

11111111

Base 8 (octal)

377

Base 10 (decimal)

255

Base 16 (hexadecimal)

ff

BasePrefixRepresentation
Base 20b11111111
Base 80o377
Base 10255
Base 160xff

How it works

  • Pick an input base and an output base, then enter the number to convert. Along with the representation in your chosen base, you also see the binary, octal, decimal and hexadecimal values at the same time.
  • For bases above 16, digits from 10 upward are written with letters (a-z). Input accepts either uppercase or lowercase, and results are shown in lowercase.
  • Add a minus sign in front to treat the value as negative; the sign is carried into the result. When the value is 0 no sign is shown.
  • To make long numbers easier to read, you may include underscores (_), commas (,) or spaces in the input. They are stripped automatically before calculation.
  • Decimals and exponential notation are not supported; enter integers only. If you type a digit that does not belong to the selected base, an error is shown.
  • Calculations use arbitrary-precision integers internally, so even very large numbers that would lose accuracy on an ordinary calculator are converted correctly.