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
Base 10 (decimal)
Output base (common values)
Base 2 (binary)
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
| Base | Prefix | Representation |
|---|---|---|
| Base 2 | 0b | 11111111 |
| Base 8 | 0o | 377 |
| Base 10 | — | 255 |
| Base 16 | 0x | ff |
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.
Reviews
Tell us what you think of this calculator.
Write a review
Found an incorrect result or a problem? Turn this on to report it.
- Home
Base-N Number Converter