Number base converter
Convert a whole number between binary, octal, decimal, hexadecimal and any base from 2 to 36, of any size.
Number
Result
What it does
The number base converter turns a whole number into binary, octal, decimal and hexadecimal at once, and into any other base from 2 to 36 on request. It reads the number in the system you choose, accepts the prefixes 0x, 0b and 0o, ignores spaces and underscores, and works with numbers of any size because it does not round. It runs in your browser. Use it as a binary converter, a hex converter or a decimal to binary calculator.
How to use it
- 1Type the number and choose the system it is written in.
- 2Read it in binary, octal, decimal and hex.
- 3Add another base from 2 to 36 if you need it.
Common uses
- Turn 255 into FF or 11111111 for code or a colour value.
- Read a binary number from a textbook as decimal.
- Convert a hex memory address to decimal.
- Check an octal file permission such as 755.
- Convert to base 36 for a short code.
Questions
Which bases does it support?
Binary, octal, decimal and hexadecimal, and any base from 2 to 36 using the digits 0 to 9 and the letters A to Z.
Can I use prefixes like 0x?
Yes. 0x1F is read as hex, 0b101 as binary and 0o17 as octal, whatever system you picked.
What happens with a wrong digit?
You get a plain message naming the digit that does not belong in that base, for example that 2 is not a binary digit.
Are negative numbers supported?
Yes, put a minus in front. The result is shown with a minus, not as two's complement.
Is there a size limit?
Numbers up to 400 digits work, because the calculation uses exact integers.
Why is the binary shown in groups of four?
Groups of four digits are easier to read and match one hex digit each.
Does it handle fractions like 0.5?
No. It converts whole numbers only.